From 6e233c77d878efefff39990b4ddd9c6a52d57f3f Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 30 May 2023 19:44:36 -0400 Subject: [PATCH] bgpd: blnc cannot be NULL at if statement time It is impossible for the blnc statement to ever be NULL at line 1470 as that the if statement at 1453 guarantees it to be set to something. Signed-off-by: Donald Sharp --- bgpd/bgp_mplsvpn.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index ecc84533b0..dc9bd3cff5 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -1467,13 +1467,12 @@ static mpls_label_t _vpn_leak_from_vrf_get_per_nexthop_label( /* Unlink from any existing nexthop cache. Free the entry if unused. */ bgp_mplsvpn_path_nh_label_unlink(pi); - if (blnc) { - /* updates NHT pi list reference */ - LIST_INSERT_HEAD(&(blnc->paths), pi, label_nh_thread); - pi->label_nexthop_cache = blnc; - pi->label_nexthop_cache->path_count++; - blnc->last_update = monotime(NULL); - } + + /* updates NHT pi list reference */ + LIST_INSERT_HEAD(&(blnc->paths), pi, label_nh_thread); + pi->label_nexthop_cache = blnc; + pi->label_nexthop_cache->path_count++; + blnc->last_update = monotime(NULL); /* then add or update the selected nexthop */ if (!blnc->nh)