aboutsummaryrefslogtreecommitdiff
path: root/include/ntp_debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ntp_debug.h')
-rw-r--r--include/ntp_debug.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/ntp_debug.h b/include/ntp_debug.h
index 376b24b957db..55b2e1a76d8e 100644
--- a/include/ntp_debug.h
+++ b/include/ntp_debug.h
@@ -13,11 +13,13 @@
*/
#ifdef DEBUG
-#define DPRINTF(_lvl_, _arg_) \
- if (debug >= (_lvl_)) \
- printf _arg_;
+#define DPRINTF(_lvl_, _arg_) \
+ do { \
+ if (debug >= (_lvl_)) \
+ printf _arg_; \
+ } while (0)
#else
-#define DPRINTF(_lvl_, _arg_)
+#define DPRINTF(_lvl_, _arg_) do {} while (0)
#endif
#endif