net/route: properly brace the RT_LOG() macro

This commit is contained in:
Gleb Smirnoff 2023-10-18 22:21:53 -07:00
parent 2d49ff1e21
commit 28f6910714

View file

@ -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.