diff options
author | Donald Sharp <sharpd@nvidia.com> | 2023-05-31 01:44:36 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2023-06-01 14:58:16 +0200 |
commit | 6e233c77d878efefff39990b4ddd9c6a52d57f3f (patch) | |
tree | e5362a92f37f3cd36ac2d500bb954115ca87ff66 | |
parent | zebra: Consolidate the stream_failure section with normal return (diff) | |
download | frr-6e233c77d878efefff39990b4ddd9c6a52d57f3f.tar.xz frr-6e233c77d878efefff39990b4ddd9c6a52d57f3f.zip |
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 <sharpd@nvidia.com>
-rw-r--r-- | bgpd/bgp_mplsvpn.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index ecc84533b..dc9bd3cff 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) |