From 8c6d16e6b7c4db6901cf0f188023decc0aa042d8 Mon Sep 17 00:00:00 2001 From: nafets227 Date: Sun, 9 Nov 2014 23:14:23 +0100 Subject: [PATCH] Bugfix of LOG Makros the trailing ";" leads to unexpeczed results if the macro is used in if if (somecondition) debug(blabla); erroneously expanded to if (somecondition) dsyslog(blablabl); ; --- common.h | 10 +++++----- device.c | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/common.h b/common.h index 3761006..4f98f23 100644 --- a/common.h +++ b/common.h @@ -13,13 +13,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 info(x...) isyslog("SATIP: " x) +#define error(x...) esyslog("ERROR: " x) #endif #define ELEMENTS(x) (sizeof(x) / sizeof(x[0])) diff --git a/device.c b/device.c index 77ca71a..5041285 100644 --- a/device.c +++ b/device.c @@ -7,7 +7,6 @@ #include "config.h" #include "discover.h" -#include "param.h" #include "device.h" #define SATIP_MAX_DEVICES MAXDEVICES