summaryrefslogtreecommitdiff
path: root/tests/readdir-rand.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-06-17 09:36:51 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2016-06-17 14:43:44 +0000
commit71e768d23030c4eb5c74ea4df9b8c63544be21fb (patch)
tree8c667144f680e0e71a4d06bb18c773a3e9ea8964 /tests/readdir-rand.c
parentd03ae448d04efefc5f2944ef9f3fafcf9e7b743d (diff)
downloadostree-71e768d23030c4eb5c74ea4df9b8c63544be21fb.tar.gz
build: Fix libreaddir-rand to honor global CFLAGS
It's unfortunate that in automake one has to explicitly include the globa `$(AM_CFLAGS)` if one sets `CFLAGS`, and similarly for other variables. I'm trying to use `-fsanitize=address`, and not including it was causing linker failures. We also weren't inheriting the global warnings etc., so I had to fix a decl-after-statement. Closes: #351 Approved by: jlebon
Diffstat (limited to 'tests/readdir-rand.c')
-rw-r--r--tests/readdir-rand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/readdir-rand.c b/tests/readdir-rand.c
index ee43756f..afef387c 100644
--- a/tests/readdir-rand.c
+++ b/tests/readdir-rand.c
@@ -109,12 +109,12 @@ readdir (DIR *dirp)
{
if (g_random_boolean ())
{
+ struct dirent *copy;
if (!de)
{
de = dir_entries_new ();
g_hash_table_insert (direntcache, dirp, de);
}
- struct dirent *copy;
copy = g_memdup (ret, sizeof (struct dirent));
g_ptr_array_add (de->entries, copy);
}