]> granicus.if.org Git - gc/commitdiff
Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF
authorIvan Maidanski <ivmai@mail.ru>
Sat, 22 Dec 2012 17:55:45 +0000 (21:55 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 22 Dec 2012 17:55:45 +0000 (21:55 +0400)
* include/private/gc_priv.h (GC_COND_LOG_PRINTF,
GC_VERBOSE_LOG_PRINTF): Use EXPECT to test GC_print_stats value.

include/private/gc_priv.h

index f800f090f107b463af2494158e5570742c4cb357..233951edba972ebf58ca69a841c17f9e03c1503c 100644 (file)
@@ -2083,9 +2083,10 @@ GC_API_PRIV void GC_log_printf(const char * format, ...)
 #endif /* GC_ANDROID_LOG */
 
 /* Convenient macros for GC_[verbose_]log_printf invocation.    */
-#define GC_COND_LOG_PRINTF if (!GC_print_stats) {} else GC_log_printf
+#define GC_COND_LOG_PRINTF \
+                if (EXPECT(!GC_print_stats, TRUE)) {} else GC_log_printf
 #define GC_VERBOSE_LOG_PRINTF \
-                if (GC_print_stats != VERBOSE) {} else GC_verbose_log_printf
+    if (EXPECT(GC_print_stats != VERBOSE, TRUE)) {} else GC_verbose_log_printf
 #ifndef GC_DBGLOG_PRINTF
 # define GC_DBGLOG_PRINTF if (!GC_PRINT_STATS_FLAG) {} else GC_log_printf
 #endif