We lock and set peer->bgp at peer creation and only
remove it at deletion. Therefore these tests are
not needed.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bfd_info = (struct bfd_info *)peer->bfd_info;
- if (peer->bgp && (peer->bgp->inst_type == BGP_INSTANCE_TYPE_VRF))
+ if (peer->bgp->inst_type == BGP_INSTANCE_TYPE_VRF)
vrf_id = peer->bgp->vrf_id;
if (command == ZEBRA_BFD_DEST_DEREGISTER) {
return 0;
}
- if (peer->bgp && peer->bgp->vrf_id == VRF_UNKNOWN) {
+ if (peer->bgp->vrf_id == VRF_UNKNOWN) {
if (bgp_debug_neighbor_events(peer))
zlog_err(
"%s [FSM] In a VRF that is not initialised yet",
if (peer->status != Established)
return 0;
- if (peer->bgp && peer->bgp->main_peers_update_hold)
+ if (peer->bgp->main_peers_update_hold)
return 0;
do {