From b8e129314aaf43a40e9bf15947578181cc53d675 Mon Sep 17 00:00:00 2001 From: yult Date: Tue, 10 Nov 2020 10:48:43 +0800 Subject: vlib: macro definition error in 'VLIB_DECLARE_INIT_FUNCTION(x, tag)' '_vlib_init_function_##tag_##x' should be '_vlib_init_function_##tag##_##x' Type: fix Signed-off-by: yult Change-Id: I091c8aa6091fe6e314e50fa00201d035869a1d96 --- src/vlib/init.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/vlib') diff --git a/src/vlib/init.h b/src/vlib/init.h index 68ac2f36717..c5447308513 100644 --- a/src/vlib/init.h +++ b/src/vlib/init.h @@ -124,15 +124,15 @@ typedef struct vlib_config_function_runtime_t vlib_init_function_t * _VLIB_INIT_FUNCTION_SYMBOL (x, tag) = x; \ static void __vlib_add_##tag##_function_##x (void) \ __attribute__((__constructor__)) ; \ -static _vlib_init_function_list_elt_t _vlib_init_function_##tag_##x; \ +static _vlib_init_function_list_elt_t _vlib_init_function_##tag##_##x; \ static void __vlib_add_##tag##_function_##x (void) \ { \ vlib_main_t * vm = vlib_get_main(); \ - _vlib_init_function_##tag_##x.next_init_function \ + _vlib_init_function_##tag##_##x.next_init_function \ = vm->tag##_function_registrations; \ - vm->tag##_function_registrations = &_vlib_init_function_##tag_##x; \ - _vlib_init_function_##tag_##x.f = &x; \ - _vlib_init_function_##tag_##x.name = #x; \ + vm->tag##_function_registrations = &_vlib_init_function_##tag##_##x; \ + _vlib_init_function_##tag##_##x.f = &x; \ + _vlib_init_function_##tag##_##x.name = #x; \ } \ static void __vlib_rm_##tag##_function_##x (void) \ __attribute__((__destructor__)) ; \ @@ -162,7 +162,7 @@ static void __vlib_rm_##tag##_function_##x (void) \ this = this->next_init_function; \ } \ } \ -static _vlib_init_function_list_elt_t _vlib_init_function_##tag_##x +static _vlib_init_function_list_elt_t _vlib_init_function_##tag##_##x #else /* create unused pointer to silence compiler warnings and get whole function optimized out */ -- cgit 1.2.3-korg