From 80abbddae77be48df614631946c1a8e8161366bc Mon Sep 17 00:00:00 2001 From: nafets227 Date: Sun, 23 Nov 2014 13:33:47 +0100 Subject: [PATCH] Corrected log Macros. If used like the code below, it would produce a compile error as in the 'if' path there would be two semicolons: if (anything) debug(...); else doanything(); --- common.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common.h b/common.h index 08ea6e0..84abce9 100644 --- a/common.h +++ b/common.h @@ -14,13 +14,13 @@ #include #ifdef DEBUG -#define debug(x...) dsyslog("SATIP: " x); -#define info(x...) isyslog("SATIP: " x); -#define error(x...) esyslog("ERROR: " x); +#define debug(x...) dsyslog("SATIP: " x) +#define info(x...) isyslog("SATIP: " x) +#define error(x...) esyslog("ERROR: " x) #else -#define debug(x...) ; -#define info(x...) isyslog("SATIP: " x); -#define error(x...) esyslog("ERROR: " x); +#define debug(x...) {} +#define info(x...) isyslog("SATIP: " x) +#define error(x...) esyslog("ERROR: " x) #endif #define ELEMENTS(x) (sizeof(x) / sizeof(x[0]))