]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
As pointed out by GCC 5.1 macro arguments ought to be paranthesized
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 2 Aug 2015 19:31:14 +0000 (19:31 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 2 Aug 2015 19:31:14 +0000 (19:31 +0000)
when referenced. Previously CHECK(a && b) would expand to !a && b
which clearly was not the intention.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15470

memcheck/tests/unit_libcbase.c

index 19595f99e95e6f39ea55cd2bea66b831b767034d..63f1d79d6ab5f6762d1a032216ba6799e26182f6 100644 (file)
@@ -28,7 +28,7 @@ void VG_(exit_now)( Int status )
 
 
 #define  CHECK(x) \
-   if (!x) { fprintf(stderr, "failure: %s:%d\n", __FILE__, __LINE__); }
+   if (!(x)) { fprintf(stderr, "failure: %s:%d\n", __FILE__, __LINE__); }
 
 
 void test_VG_STREQ(void)