]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: enums in switches do not need default 5745/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 31 Jan 2020 14:24:58 +0000 (09:24 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 31 Jan 2020 14:59:57 +0000 (09:59 -0500)
If you have enums handled in a switch adding a default case
makes it fun to fix when new stuff is added later.  Remove.

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

index e1f0b36cb0534bf7412b632b2479bef25702c348..da8e6a907bac1338f90ec5d25ce53fcce7cbeb9c 100644 (file)
@@ -2296,11 +2296,6 @@ int bgp_gr_lookup_n_update_all_peer(struct bgp *bgp,
                                "%s [BGP_GR] GLOBAL_INVALID",
                                __func__);
                                return BGP_ERR_GR_OPERATION_FAILED;
-                       default:
-                               zlog_debug(
-                               "%s [BGP_GR] Global unknown ERROR",
-                               __func__);
-                               return BGP_ERR_GR_OPERATION_FAILED;
                        }
                }
        }
index 3d613567a1b77f5ec90e3677782fe4baeb757896..1cd2f0a3973bfd9b09170166261574b0eb9839df 100644 (file)
@@ -12678,7 +12678,7 @@ static void bgp_show_global_graceful_restart_mode_vty(struct vty *vty,
 
        vty_out(vty, "\n%s", SHOW_GR_HEADER);
 
-       int bgp_global_gr_mode = bgp_global_gr_mode_get(bgp);
+       enum global_mode bgp_global_gr_mode = bgp_global_gr_mode_get(bgp);
 
        switch (bgp_global_gr_mode) {
 
@@ -12695,7 +12695,6 @@ static void bgp_show_global_graceful_restart_mode_vty(struct vty *vty,
                break;
 
        case GLOBAL_INVALID:
-       default:
                vty_out(vty,
                        "Global BGP GR Mode  Invalid\n");
                break;