From: Ivan Maidanski Date: Sat, 22 Dec 2012 17:55:45 +0000 (+0400) Subject: Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF X-Git-Tag: gc7_4_0~111 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c08deb6d13103d6b1600287ad6ed8e59122c77c5;p=gc Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF * include/private/gc_priv.h (GC_COND_LOG_PRINTF, GC_VERBOSE_LOG_PRINTF): Use EXPECT to test GC_print_stats value. --- diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index f800f090..233951ed 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -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