Fix operator priority

(notably ternary ?: is less prioritized than <=)
This commit is contained in:
Samuel Thibault 2022-11-03 11:50:04 +01:00
parent 233f7e8526
commit fbf0c191e1

View file

@ -984,8 +984,8 @@ void lac_tunnelshutdown(tunnelidt t, char *reason, int result, int error, char *
#undef LOG #undef LOG
#undef LOG_HEX #undef LOG_HEX
#define LOG(D, s, t, f, ...) ({ if (D <= config->debug) _log(D, s, t, f, ## __VA_ARGS__); }) #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_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(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); void _log_hex(int level, const char *title, const uint8_t *data, int maxsize);