diff --git a/l2tpns.h b/l2tpns.h index b6eccf0..1cc2c3e 100644 --- a/l2tpns.h +++ b/l2tpns.h @@ -984,8 +984,8 @@ void lac_tunnelshutdown(tunnelidt t, char *reason, int result, int error, char * #undef LOG #undef LOG_HEX -#define LOG(D, s, t, f, ...) ({ if (D <= config->debug) _log(D, s, t, f, ## __VA_ARGS__); }) -#define LOG_HEX(D, t, d, s) ({ if (D <= config->debug) _log_hex(D, t, d, s); }) +#define LOG(D, s, t, f, ...) ({ if ((D) <= config->debug) _log((D), s, t, f, ## __VA_ARGS__); }) +#define LOG_HEX(D, t, d, s) ({ if ((D) <= config->debug) _log_hex((D), t, d, s); }) void _log(int level, sessionidt s, tunnelidt t, const char *format, ...) __attribute__((format (printf, 4, 5))); void _log_hex(int level, const char *title, const uint8_t *data, int maxsize);