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>
This commit is contained in:
Donald Sharp 2023-05-30 19:44:36 -04:00
parent 3ddf7680fd
commit 6e233c77d8

View File

@ -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)