summaryrefslogtreecommitdiff
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r--bgpd/bgp_route.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 1cd0bbe578..c6a9aa722d 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -122,8 +122,6 @@ struct bgp_node *bgp_afi_node_get(struct bgp_table *table, afi_t afi,
struct bgp_node *prn = NULL;
assert(table);
- if (!table)
- return NULL;
if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP)
|| (safi == SAFI_EVPN)) {
@@ -299,7 +297,7 @@ static int bgp_node_set_defer_flag(struct bgp_node *rn, bool delete)
{
struct peer *peer;
struct bgp_path_info *old_pi, *nextpi;
- bool set_flag = 0;
+ bool set_flag = false;
struct bgp *bgp = NULL;
struct bgp_table *table = NULL;
afi_t afi = 0;
@@ -339,7 +337,7 @@ static int bgp_node_set_defer_flag(struct bgp_node *rn, bool delete)
*/
if (CHECK_FLAG(old_pi->flags, BGP_PATH_STALE)
&& (old_pi->sub_type == BGP_ROUTE_NORMAL)) {
- set_flag = 1;
+ set_flag = true;
} else {
/* If the peer is graceful restart capable and peer is
* restarting mode, set the flag BGP_NODE_SELECT_DEFER
@@ -349,7 +347,7 @@ static int bgp_node_set_defer_flag(struct bgp_node *rn, bool delete)
&& BGP_PEER_RESTARTING_MODE(peer)
&& (old_pi
&& old_pi->sub_type == BGP_ROUTE_NORMAL)) {
- set_flag = 1;
+ set_flag = true;
}
}
if (set_flag)
@@ -4909,8 +4907,6 @@ void bgp_static_update(struct bgp *bgp, struct prefix *p,
#endif
assert(bgp_static);
- if (!bgp_static)
- return;
rn = bgp_afi_node_get(bgp->rib[afi][safi], afi, safi, p, NULL);