diff options
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ospf_api.c | 4 | ||||
-rw-r--r-- | ospfd/ospf_main.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ospfd/ospf_api.c b/ospfd/ospf_api.c index fc3b51dd..74a49e3b 100644 --- a/ospfd/ospf_api.c +++ b/ospfd/ospf_api.c @@ -155,7 +155,7 @@ ospf_api_typename (int msgtype) { MSG_NSM_CHANGE, "NSM change", }, }; - int i, n = sizeof (NameTab) / sizeof (NameTab[0]); + int i, n = array_size(NameTab); const char *name = NULL; for (i = 0; i < n; i++) @@ -187,7 +187,7 @@ ospf_api_errname (int errcode) { OSPF_API_UNDEF, "Undefined", }, }; - int i, n = sizeof (NameTab) / sizeof (NameTab[0]); + int i, n = array_size(NameTab); const char *name = NULL; for (i = 0; i < n; i++) diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index bad674b6..1448c7d8 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -68,7 +68,7 @@ struct zebra_privs_t ospfd_privs = .vty_group = VTY_GROUP, #endif .caps_p = _caps_p, - .cap_num_p = sizeof(_caps_p)/sizeof(_caps_p[0]), + .cap_num_p = array_size(_caps_p), .cap_num_i = 0 }; @@ -285,7 +285,7 @@ main (int argc, char **argv) /* Library inits. */ zprivs_init (&ospfd_privs); - signal_init (master, Q_SIGC(ospf_signals), ospf_signals); + signal_init (master, array_size(ospf_signals), ospf_signals); cmd_init (1); debug_init (); vty_init (master); |