test: fix litest_log() when libunwind is missing
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 5 Jun 2015 01:40:26 +0000 (11:40 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 5 Jun 2015 01:41:59 +0000 (11:41 +1000)
Previous expansion had side-effects when litest_log was called in an if
condition without {}

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
test/litest.c

index c9c17d0..0e2cb96 100644 (file)
@@ -61,8 +61,8 @@ const char *filter_group = NULL;
 #define litest_log(...) fprintf(stderr, __VA_ARGS__)
 #define litest_vlog(format_, args_) vfprintf(stderr, format_, args_)
 #else
-#define litest_log(...) /* __VA_ARGS__ */
-#define litest_vlog(...) /* __VA_ARGS__ */
+#define litest_log(...) { /* __VA_ARGS__ */ }
+#define litest_vlog(...) { /* __VA_ARGS__ */ }
 #endif
 
 #ifdef HAVE_LIBUNWIND