From c46781095ec64fbc4f8cf6097ca70b594a68c583 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Sat, 25 Sep 2021 21:04:29 +0200 Subject: Add timeout --- src/log.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/log.h') 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__); \ -- cgit v1.2.3