summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-08-27 23:30:39 -0700
committerDave Wallace <dwallacelf@gmail.com>2023-08-31 01:05:15 +0000
commit1765f014bc7fcc3b924019ec96350eb50bef629f (patch)
tree62529965ff45337299d7aabd8ecc2884e9916be9 /src/vnet/session
parent8d61c59c3f1e05e49b89a700a1640aa9bcebc6b8 (diff)
session: fix compilation when SESSION_DEBUG is on
Wrap SESSION_EVT in do loop to avoid complaints about if statement having no arguments which can happen if debugging for groups is not enabled. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I35af179b806ed47a1e20816a19291c31fdb7566a
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session_debug.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/session/session_debug.h b/src/vnet/session/session_debug.h
index 45dd77c7e45..d433ef47fb1 100644
--- a/src/vnet/session/session_debug.h
+++ b/src/vnet/session/session_debug.h
@@ -396,9 +396,13 @@ extern session_dbg_main_t session_dbg_main;
#define session_evt_grp_dbg_lvl(_evt) \
session_dbg_main.grp_dbg_lvl[session_evt_grp (_evt)]
#define SESSION_EVT(_evt, _args...) \
- if (PREDICT_FALSE (session_evt_grp_dbg_lvl (_evt) >= \
- session_evt_lvl (_evt))) \
- CC (_evt, _HANDLER) (_args)
+ do \
+ { \
+ if (PREDICT_FALSE (session_evt_grp_dbg_lvl (_evt) >= \
+ session_evt_lvl (_evt))) \
+ CC (_evt, _HANDLER) (_args); \
+ } \
+ while (0)
#else
#define SESSION_EVT(_evt, _args...)
#define SESSION_DBG(_fmt, _args...)