]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: make hook.h cpp-compatible 6349/head
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 5 May 2020 18:03:19 +0000 (14:03 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 5 May 2020 18:05:03 +0000 (14:05 -0400)
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>
lib/hook.h

index 3823cebe6ac563025d0fce654e5c4ac51df0fb21..bef5351e905765d5defc7922ab61c987e9709e79 100644 (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)