]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Fix case default usage w/ enum's
authorDonald Sharp <sharpd@nvidia.com>
Tue, 14 Sep 2021 17:28:00 +0000 (13:28 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 14 Sep 2021 17:28:00 +0000 (13:28 -0400)
We should not be using `case default` with an enumerated type
This prevents the developer of new cases from knowing where
they need to fix by just compiling.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/zebra_vty.c

index 1c8a1ad09a4fc37a1bc49f4765c08668d77b8d83..79087c58499212a8b3df06acc88106e91a7d782c 100644 (file)
@@ -353,8 +353,6 @@ static void show_nexthop_detail_helper(struct vty *vty,
                        break;
                }
                break;
-       default:
-               break;
        }
 
        if (re->vrf_id != nexthop->vrf_id) {
@@ -605,8 +603,6 @@ static void show_route_nexthop_helper(struct vty *vty,
                        break;
                }
                break;
-       default:
-               break;
        }
 
        if ((re == NULL || (nexthop->vrf_id != re->vrf_id)))
@@ -777,8 +773,6 @@ static void show_nexthop_json_helper(json_object *json_nexthop,
                        break;
                }
                break;
-       default:
-               break;
        }
 
        if (nexthop->vrf_id != re->vrf_id)
@@ -2247,8 +2241,6 @@ static void show_ip_route_nht_dump(struct vty *vty, struct nexthop *nexthop,
                        break;
                }
                break;
-       default:
-               break;
        }
 }