*: use array_size() helper macro
Use the array_size() helper macro. Replaces several instances of local
macros with the same definition.
Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 0f1d482..1ff1ac9 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -135,7 +135,7 @@
.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,
};
@@ -422,7 +422,7 @@
/* Initializations. */
srand (time (NULL));
- signal_init (master, Q_SIGC(bgp_signals), bgp_signals);
+ signal_init (master, array_size(bgp_signals), bgp_signals);
zprivs_init (&bgpd_privs);
cmd_init (1);
vty_init (master);