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/abf/abf_api.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/plugins/abf/abf_api.c') diff --git a/src/plugins/abf/abf_api.c b/src/plugins/abf/abf_api.c index cc55b214e35..66121acbdf0 100644 --- a/src/plugins/abf/abf_api.c +++ b/src/plugins/abf/abf_api.c @@ -34,10 +34,11 @@ #include /** - * Base message ID fot the plugin + * Base message ID for the plugin */ static u32 abf_base_msg_id; +#define REPLY_MSG_ID_BASE (abf_base_msg_id) #include static void @@ -93,7 +94,7 @@ vl_api_abf_policy_add_del_t_handler (vl_api_abf_policy_add_del_t * mp) done: vec_free (paths); - REPLY_MACRO (VL_API_ABF_POLICY_ADD_DEL_REPLY + abf_base_msg_id); + REPLY_MACRO (VL_API_ABF_POLICY_ADD_DEL_REPLY); } static void @@ -118,7 +119,7 @@ vl_api_abf_itf_attach_add_del_t_handler (vl_api_abf_itf_attach_add_del_t * mp) ntohl (mp->attach.sw_if_index)); } - REPLY_MACRO (VL_API_ABF_ITF_ATTACH_ADD_DEL_REPLY + abf_base_msg_id); + REPLY_MACRO (VL_API_ABF_ITF_ATTACH_ADD_DEL_REPLY); } typedef struct abf_dump_walk_ctx_t_ -- cgit 1.2.3-korg