diff --git a/sys/net/route/route_debug.h b/sys/net/route/route_debug.h index b00fbf1784e..1e682bd4561 100644 --- a/sys/net/route/route_debug.h +++ b/sys/net/route/route_debug.h @@ -107,10 +107,11 @@ SYSCTL_DECL(_net_route_debug); * Example: [nhop_neigh] nhops_update_neigh: L2 prepend update from lle/inet/valid/vtnet0/10.0.0.157 */ #define RT_LOG(_l, _fmt, ...) RT_LOG_##_l(_l, _fmt, ## __VA_ARGS__) -#define _RT_LOG(_l, _fmt, ...) if (_DEBUG_PASS_MSG(_l)) { \ - _output("[" DEBUG_PREFIX_NAME "] %s: " _fmt "\n", __func__, ##__VA_ARGS__); \ -} - +#define _RT_LOG(_l, _fmt, ...) do { \ + if (_DEBUG_PASS_MSG(_l)) \ + _output("[" DEBUG_PREFIX_NAME "] %s: " _fmt "\n", \ + __func__, ##__VA_ARGS__); \ +} while (0) /* * Wrapper logic to avoid compiling high levels of debugging messages for production systems.