From 5d5f85f5e4003476fb6d9a0ccd6ad58ad90e5138 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Fri, 3 Dec 2021 10:48:13 +0000 Subject: api: refactor to use REPLY_MSG_ID_BASE #define REPLY_MSG_ID_BASE is the standard way to define reply message id base, so this refactor makes all the files use that. This is a preparation patch for future safety add-ons which rely on REPLY_MACRO* parameters to be preprocessor tokens identifying the message instead, Type: refactor Signed-off-by: Klement Sekera Change-Id: Ibe3e056a3d9326d08af45bbcb25588b11e870141 --- src/plugins/l3xc/l3xc_api.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/plugins/l3xc') diff --git a/src/plugins/l3xc/l3xc_api.c b/src/plugins/l3xc/l3xc_api.c index 847acaac331..d4a837d7d9c 100644 --- a/src/plugins/l3xc/l3xc_api.c +++ b/src/plugins/l3xc/l3xc_api.c @@ -37,6 +37,7 @@ */ static u32 l3xc_base_msg_id; +#define REPLY_MSG_ID_BASE (l3xc_base_msg_id) #include static void @@ -96,12 +97,7 @@ done: BAD_SW_IF_INDEX_LABEL; - /* *INDENT-OFF* */ - REPLY_MACRO2 (VL_API_L3XC_UPDATE_REPLY + l3xc_base_msg_id, - ({ - rmp->stats_index = 0; - })) - /* *INDENT-ON* */ + REPLY_MACRO2 (VL_API_L3XC_UPDATE_REPLY, ({ rmp->stats_index = 0; })) } static void @@ -116,7 +112,7 @@ vl_api_l3xc_del_t_handler (vl_api_l3xc_del_t * mp) BAD_SW_IF_INDEX_LABEL; - REPLY_MACRO (VL_API_L3XC_DEL_REPLY + l3xc_base_msg_id); + REPLY_MACRO (VL_API_L3XC_DEL_REPLY); } typedef struct l3xc_dump_walk_ctx_t_ -- cgit 1.2.3-korg