summaryrefslogtreecommitdiff
path: root/src/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.h')
-rw-r--r--src/log.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/log.h b/src/log.h
index 874e1bc..77eab35 100644
--- a/src/log.h
+++ b/src/log.h
@@ -6,13 +6,15 @@
#define dbg(format, ...) \
dbgl(format "\n", ## __VA_ARGS__)
-#define dbgl(format, ...) \
- printf(format, ## __VA_ARGS__); \
- fflush(stderr)
+#define dbgl(format, ...) do{\
+ printf(format, ## __VA_ARGS__); \
+ fflush(stderr); \
+ } while(0)
-#define err(format, ...) \
- printf(format "\n", ## __VA_ARGS__); \
- fflush(stderr)
+#define err(format, ...) do{\
+ printf(format "\n", ## __VA_ARGS__); \
+ fflush(stderr); \
+ } while(0)
#define fatal(format, ...) do{\
printf(format "\n", ## __VA_ARGS__); \