]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix more assignments inside of if statement
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 6 Mar 2017 15:43:15 +0000 (10:43 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 6 Mar 2017 15:43:15 +0000 (10:43 -0500)
Code inspection showed a bunch more spots where
we were assigning the safi inside of a if statement

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_route.c

index 70ef60576031f37ce9d28fc1b4e502eb543c8153..54cc7aa03067800a4b0bed5fd8d6e62407dd5487 100644 (file)
@@ -5267,7 +5267,7 @@ bgp_aggregate_increment (struct bgp *bgp, struct prefix *p,
   struct bgp_table *table;
 
   /* MPLS-VPN aggregation is not yet supported. */
-  if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP) || (safi = SAFI_EVPN))
+  if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP) || (safi == SAFI_EVPN))
     return;
 
   table = bgp->aggregate[afi][safi];
@@ -5304,7 +5304,7 @@ bgp_aggregate_decrement (struct bgp *bgp, struct prefix *p,
   struct bgp_table *table;
 
   /* MPLS-VPN aggregation is not yet supported. */
-  if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP) || (safi = SAFI_EVPN))
+  if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP) || (safi == SAFI_EVPN))
     return;
 
   table = bgp->aggregate[afi][safi];
@@ -6129,7 +6129,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
             {
               json_nexthop_global = json_object_new_object();
 
-             if ((safi == SAFI_MPLS_VPN) || (safi = SAFI_EVPN))
+             if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_EVPN))
                 json_object_string_add(json_nexthop_global, "ip", inet_ntoa (attr->extra->mp_nexthop_global_in));
               else
                 json_object_string_add(json_nexthop_global, "ip", inet_ntoa (attr->nexthop));
@@ -6139,7 +6139,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
             }
           else
             {
-             if ((safi == SAFI_MPLS_VPN) || (safi = SAFI_EVPN))
+             if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_EVPN))
                vty_out (vty, "%-16s",
                          inet_ntoa (attr->extra->mp_nexthop_global_in));
              else