summaryrefslogtreecommitdiff
path: root/bgpd/bgp_evpn.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_evpn.c')
-rw-r--r--bgpd/bgp_evpn.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c
index c99f539c7b..88581736a3 100644
--- a/bgpd/bgp_evpn.c
+++ b/bgpd/bgp_evpn.c
@@ -111,11 +111,7 @@ static bool vni_hash_cmp(const void *p1, const void *p2)
const struct bgpevpn *vpn1 = p1;
const struct bgpevpn *vpn2 = p2;
- if (!vpn1 && !vpn2)
- return true;
- if (!vpn1 || !vpn2)
- return false;
- return (vpn1->vni == vpn2->vni);
+ return vpn1->vni == vpn2->vni;
}
int vni_list_cmp(void *p1, void *p2)
@@ -145,12 +141,6 @@ static bool vrf_import_rt_hash_cmp(const void *p1, const void *p2)
const struct vrf_irt_node *irt1 = p1;
const struct vrf_irt_node *irt2 = p2;
- if (irt1 == NULL && irt2 == NULL)
- return true;
-
- if (irt1 == NULL || irt2 == NULL)
- return false;
-
return (memcmp(irt1->rt.val, irt2->rt.val, ECOMMUNITY_SIZE) == 0);
}
@@ -261,12 +251,6 @@ static bool import_rt_hash_cmp(const void *p1, const void *p2)
const struct irt_node *irt1 = p1;
const struct irt_node *irt2 = p2;
- if (irt1 == NULL && irt2 == NULL)
- return true;
-
- if (irt1 == NULL || irt2 == NULL)
- return false;
-
return (memcmp(irt1->rt.val, irt2->rt.val, ECOMMUNITY_SIZE) == 0);
}
@@ -2536,7 +2520,7 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
/* Gateway IP nexthop should be resolved */
if (attr.evpn_overlay.type == OVERLAY_INDEX_GATEWAY_IP) {
if (bgp_find_or_add_nexthop(bgp_vrf, bgp_vrf, afi, safi, pi,
- NULL, 0))
+ NULL, 0, NULL))
bgp_path_info_set_flag(dest, pi, BGP_PATH_VALID);
else {
if (BGP_DEBUG(nht, NHT)) {