summaryrefslogtreecommitdiff
path: root/src/log.h
diff options
context:
space:
mode:
authorJesper Jensen <jesper@slashwin.dk>2021-09-25 21:04:29 +0200
committerJesper Jensen <jesper@slashwin.dk>2021-09-25 21:04:29 +0200
commitc46781095ec64fbc4f8cf6097ca70b594a68c583 (patch)
tree902aa3ef642d603f54d6d62bc1f42b6b948619da /src/log.h
parentb5127f1c7624f40437159f164ac8eabc50b65f74 (diff)
Add timeout
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__); \