]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: dead code (Coverity 1399246) 2420/head
authorpaco <paco@voltanet.io>
Wed, 13 Jun 2018 10:25:45 +0000 (12:25 +0200)
committerpaco <paco@voltanet.io>
Wed, 13 Jun 2018 10:25:45 +0000 (12:25 +0200)
Signed-off-by: F. Aragon <paco@voltanet.io>
bgpd/bgp_vty.c

index d4ebd54e46902638a605ff4d219c76db77b526b1..c1851a3e026ffe134dbb1f6fedd496177254ca78 100644 (file)
@@ -8016,16 +8016,11 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
                if (count)
                        vty_out(vty, "\nTotal number of neighbors %d\n", count);
                else {
-                       if (use_json)
-                               vty_out(vty,
-                                       "{\"error\": {\"message\": \"No %s neighbor configured\"}}\n",
-                                       afi_safi_print(afi, safi));
-                       else
-                               vty_out(vty, "No %s neighbor is configured\n",
-                                       afi_safi_print(afi, safi));
+                       vty_out(vty, "No %s neighbor is configured\n",
+                               afi_safi_print(afi, safi));
                }
 
-               if (dn_count && !use_json) {
+               if (dn_count) {
                        vty_out(vty, "* - dynamic neighbor\n");
                        vty_out(vty, "%d dynamic neighbor(s), limit %d\n",
                                dn_count, bgp->dynamic_neighbors_limit);