summaryrefslogtreecommitdiff
path: root/nhrpd/nhrp_vc.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-03-23 14:53:58 +0100
committerDavid Lamparter <equinox@diac24.net>2019-04-18 12:44:29 +0200
commit7e3a1ec742fab489eceeb23869063ebdedad12ff (patch)
treece44ea349dcc36685c2d9569e3882e444f870691 /nhrpd/nhrp_vc.c
parent0d019561bd855b6097b75d8d95a4dc69e410aae1 (diff)
lib: ZEBRA_NUM_OF -> array_size
The latter is widely used, e.g. in the Linux kernel. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'nhrpd/nhrp_vc.c')
-rw-r--r--nhrpd/nhrp_vc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nhrpd/nhrp_vc.c b/nhrpd/nhrp_vc.c
index f92ea4ac90..fa3549f5ed 100644
--- a/nhrpd/nhrp_vc.c
+++ b/nhrpd/nhrp_vc.c
@@ -102,7 +102,7 @@ int nhrp_vc_ipsec_updown(uint32_t child_id, struct nhrp_vc *vc)
{
char buf[2][SU_ADDRSTRLEN];
struct child_sa *sa = NULL, *lsa;
- uint32_t child_hash = child_id % ZEBRA_NUM_OF(childlist_head);
+ uint32_t child_hash = child_id % array_size(childlist_head);
int abort_migration = 0;
list_for_each_entry(lsa, &childlist_head[child_hash], childlist_entry)
@@ -202,7 +202,7 @@ void nhrp_vc_init(void)
size_t i;
nhrp_vc_hash = hash_create(nhrp_vc_key, nhrp_vc_cmp, "NHRP VC hash");
- for (i = 0; i < ZEBRA_NUM_OF(childlist_head); i++)
+ for (i = 0; i < array_size(childlist_head); i++)
list_init(&childlist_head[i]);
}
@@ -211,7 +211,7 @@ void nhrp_vc_reset(void)
struct child_sa *sa, *n;
size_t i;
- for (i = 0; i < ZEBRA_NUM_OF(childlist_head); i++) {
+ for (i = 0; i < array_size(childlist_head); i++) {
list_for_each_entry_safe(sa, n, &childlist_head[i],
childlist_entry)
nhrp_vc_ipsec_updown(sa->id, 0);