diff options
author | yult <yult@qssec.com> | 2020-11-10 10:48:43 +0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-11-13 16:18:02 +0000 |
commit | b8e129314aaf43a40e9bf15947578181cc53d675 (patch) | |
tree | 184c2a4bb76f2e38c8fce61c574c35d5fe170521 /src/vlib | |
parent | fba2732ec887aca516a6412bdb4e35397e81a0cc (diff) |
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 <oopsadm@gmail.com>
Change-Id: I091c8aa6091fe6e314e50fa00201d035869a1d96
Diffstat (limited to 'src/vlib')
-rw-r--r-- | src/vlib/init.h | 12 |
1 files changed, 6 insertions, 6 deletions
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 */ |