lib: make hook.h cpp-compatible

Some CPP compilers don't support these designated initializers, since
we're just zero initializing don't need em

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2020-05-05 14:03:19 -04:00
parent 15e9c561b2
commit e01a788c44

View File

@ -145,7 +145,7 @@ extern void _hook_register(struct hook *hook, struct hookent *stackent,
*/
#define _hook_reg_svar(hook, funcptr, arg, has_arg, module, funcname, prio) \
do { \
static struct hookent stack_hookent = { .ent_on_heap = 0, }; \
static struct hookent stack_hookent = {}; \
_hook_register(hook, &stack_hookent, funcptr, arg, has_arg, \
module, funcname, prio); \
} while (0)