summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/helper/log.h7
-rw-r--r--src/helper/system.h5
2 files changed, 11 insertions, 1 deletions
diff --git a/src/helper/log.h b/src/helper/log.h
index ebcb8a15..b936fee1 100644
--- a/src/helper/log.h
+++ b/src/helper/log.h
@@ -111,7 +111,12 @@ extern int debug_level;
#define LOG_LEVEL_IS(FOO) ((debug_level) >= (FOO))
#define LOG_DEBUG(expr ...) \
- ((debug_level >= LOG_LVL_DEBUG) ? log_printf_lf (LOG_LVL_DEBUG, __FILE__, __LINE__, __FUNCTION__, expr) , 0 : 0)
+ do { \
+ if (debug_level >= LOG_LVL_DEBUG) \
+ log_printf_lf(LOG_LVL_DEBUG, \
+ __FILE__, __LINE__, __func__, \
+ expr); \
+ } while (0)
#define LOG_INFO(expr ...) \
log_printf_lf (LOG_LVL_INFO, __FILE__, __LINE__, __FUNCTION__, expr)
diff --git a/src/helper/system.h b/src/helper/system.h
index af19d018..8ff3532a 100644
--- a/src/helper/system.h
+++ b/src/helper/system.h
@@ -85,4 +85,9 @@
#include <fcntl.h>
#endif
+#ifndef true
+#define true 1
+#define false 0
+#endif
+
#endif // SYSTEM_H