summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zebra_fpm_netlink.c2
-rw-r--r--zebra/zebra_fpm_protobuf.c2
-rw-r--r--zebra/zebra_rib.c2
-rw-r--r--zebra/zebra_vxlan.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c
index 28333526a..bdc1dcdff 100644
--- a/zebra/zebra_fpm_netlink.c
+++ b/zebra/zebra_fpm_netlink.c
@@ -158,7 +158,7 @@ static int netlink_route_info_add_nh(netlink_route_info_t *ri,
memset(&nhi, 0, sizeof(nhi));
src = NULL;
- if (ri->num_nhs >= (int)ZEBRA_NUM_OF(ri->nhs))
+ if (ri->num_nhs >= (int)array_size(ri->nhs))
return 0;
nhi.recursive = nexthop->rparent ? 1 : 0;
diff --git a/zebra/zebra_fpm_protobuf.c b/zebra/zebra_fpm_protobuf.c
index be0f6a23b..0f95c9ba8 100644
--- a/zebra/zebra_fpm_protobuf.c
+++ b/zebra/zebra_fpm_protobuf.c
@@ -176,7 +176,7 @@ static Fpm__AddRoute *create_add_route_message(qpb_allocator_t *allocator,
if (num_nhs >= multipath_num)
break;
- if (num_nhs >= ZEBRA_NUM_OF(nexthops))
+ if (num_nhs >= array_size(nexthops))
break;
if (nexthop->type == NEXTHOP_TYPE_BLACKHOLE) {
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 4cf4c2406..626583a84 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -3457,7 +3457,7 @@ struct route_table *rib_tables_iter_next(rib_tables_iter_t *iter)
while (1) {
while (iter->afi_safi_ix
- < (int)ZEBRA_NUM_OF(afi_safis)) {
+ < (int)array_size(afi_safis)) {
table = zebra_vrf_table(
afi_safis[iter->afi_safi_ix].afi,
afi_safis[iter->afi_safi_ix].safi,
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index 4f6e4e859..a2e217130 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -2167,7 +2167,7 @@ static unsigned int neigh_hash_keymake(void *p)
return jhash_1word(ip->ipaddr_v4.s_addr, 0);
return jhash2(ip->ipaddr_v6.s6_addr32,
- ZEBRA_NUM_OF(ip->ipaddr_v6.s6_addr32), 0);
+ array_size(ip->ipaddr_v6.s6_addr32), 0);
}
/*