summaryrefslogtreecommitdiffstats
path: root/util/cbfstool/console/console.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/console/console.h')
-rw-r--r--util/cbfstool/console/console.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/util/cbfstool/console/console.h b/util/cbfstool/console/console.h
index 0595bea5ccda..b25589ad26c2 100644
--- a/util/cbfstool/console/console.h
+++ b/util/cbfstool/console/console.h
@@ -8,15 +8,15 @@
/* Message output */
extern int verbose;
-#define ERROR(...) { fprintf(stderr, "E: " __VA_ARGS__); }
-#define WARN(...) { fprintf(stderr, "W: " __VA_ARGS__); }
-#define LOG(...) { fprintf(stderr, __VA_ARGS__); }
-#define INFO(...) { if (verbose > 0) fprintf(stderr, "INFO: " __VA_ARGS__); }
-#define DEBUG(...) { if (verbose > 1) fprintf(stderr, "DEBUG: " __VA_ARGS__); }
+#define ERROR(...) fprintf(stderr, "E: " __VA_ARGS__)
+#define WARN(...) fprintf(stderr, "W: " __VA_ARGS__)
+#define LOG(...) fprintf(stderr, __VA_ARGS__)
+#define INFO(...) do { if (verbose > 0) fprintf(stderr, "INFO: " __VA_ARGS__); } while (0)
+#define DEBUG(...) do { if (verbose > 1) fprintf(stderr, "DEBUG: " __VA_ARGS__); } while (0)
#define printk(lvl, ...) \
- { \
+ do { \
if ((lvl) <= BIOS_ERR) { \
ERROR(__VA_ARGS__); \
} else if ((lvl) <= BIOS_NOTICE) { \
@@ -26,6 +26,6 @@ extern int verbose;
} else if ((lvl) <= BIOS_DEBUG) { \
DEBUG(__VA_ARGS__); \
} \
- }
+ } while (0)
#endif