]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #2519 from pacovn/Coverity_1399238_Logically_dead_code
authorQuentin Young <qlyoung@users.noreply.github.com>
Thu, 21 Jun 2018 18:20:48 +0000 (14:20 -0400)
committerGitHub <noreply@github.com>
Thu, 21 Jun 2018 18:20:48 +0000 (14:20 -0400)
bgpd: dead code (Coverity 1399238)

1  2 
bgpd/bgp_route.c

diff --combined bgpd/bgp_route.c
index 888a0ca1154ff9018508b7acd2791628f74b2315,084cdfeb4b8db0487eb041c84decbac63c8ab455..0b1deba5171fb57ac64d4a9df0f7035aad95792f
@@@ -1318,8 -1318,6 +1318,8 @@@ void bgp_attr_add_gshut_community(struc
        old = attr->community;
        gshut = community_str2com("graceful-shutdown");
  
 +      assert(gshut);
 +
        if (old) {
                merge = community_merge(community_dup(old), gshut);
  
@@@ -6566,14 -6564,8 +6566,8 @@@ void route_vty_out(struct vty *vty, str
                } else {
                        char buf[BUFSIZ];
  
-                       if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_EVPN))
-                               snprintf(buf, sizeof(buf), "%s%s",
-                                       inet_ntoa(attr->mp_nexthop_global_in),
-                                       vrf_id_str);
-                       else
-                               snprintf(buf, sizeof(buf), "%s%s",
-                                       inet_ntoa(attr->nexthop),
-                                       vrf_id_str);
+                       snprintf(buf, sizeof(buf), "%s%s",
+                               inet_ntoa(attr->nexthop), vrf_id_str);
                        vty_out(vty, "%-16s", buf);
                }
        }