summaryrefslogtreecommitdiff
path: root/tests/test_malloc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2016-11-14 23:09:57 +0300
committerIvan Maidanski <ivmai@mail.ru>2016-11-14 23:09:57 +0300
commit239ea5f3e998ef4aca873aba5ac6668eaa252b35 (patch)
tree9c2d7a34a79acde6955f511d2960becec0bc433d /tests/test_malloc.c
parent796b2a627a958576c403673f92797a5306e6677e (diff)
downloadlibatomic_ops-239ea5f3e998ef4aca873aba5ac6668eaa252b35.tar.gz
Do not define print_list() unless used (tests)
* tests/test_malloc.c (print_list): Define only if DEBUG_RUN_ONE_TEST. * tests/test_stack.c (print_list): Define only if VERBOSE.
Diffstat (limited to 'tests/test_malloc.c')
-rw-r--r--tests/test_malloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_malloc.c b/tests/test_malloc.c
index dca06da..e9d924a 100644
--- a/tests/test_malloc.c
+++ b/tests/test_malloc.c
@@ -95,6 +95,7 @@ ln *cons(int d, ln *tail)
return result;
}
+#ifdef DEBUG_RUN_ONE_TEST
void print_list(ln *l)
{
ln *p;
@@ -105,6 +106,7 @@ void print_list(ln *l)
}
printf("\n");
}
+#endif /* DEBUG_RUN_ONE_TEST */
/* Check that l contains numbers from m to n inclusive in ascending order */
void check_list(ln *l, int m, int n)