summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2019-04-30 16:26:35 +0200
committerGitHub <noreply@github.com>2019-04-30 16:26:35 +0200
commit31e944a8a74db137424fc8f3185750b445c58d8f (patch)
treed9cccdb70da2a5c7ceb67e5f88427520930f8ed5 /zebra
parentMerge pull request #4227 from faickermo/fix_show_ip_bgp_json (diff)
parentRevert "lib: use DECLARE_SKIPLIST for timers instead of pqueue" (diff)
downloadfrr-31e944a8a74db137424fc8f3185750b445c58d8f.tar.xz
frr-31e944a8a74db137424fc8f3185750b445c58d8f.zip
Merge pull request #3045 from opensourcerouting/atoms
READY: lists/skiplists/rb-trees new API & sequence lock & atomic lists
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);
}
/*