]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: among: Remove pointless fall through
authorPhil Sutter <phil@nwl.cc>
Thu, 29 Sep 2022 17:11:55 +0000 (19:11 +0200)
committerPhil Sutter <phil@nwl.cc>
Sat, 1 Oct 2022 11:43:59 +0000 (13:43 +0200)
This seems to be a leftover from an earlier version of the switch().
This fall through is never effective as the next case's code will never
apply. So just break instead.

Fixes: 26753888720d8 ("nft: bridge: Rudimental among extension support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
extensions/libebt_among.c

index 7eb898f984bba71b3973f1537f82559be9c56015..c607a775539d3d0fd83ed5027b506a2532fe4dfa 100644 (file)
@@ -152,10 +152,9 @@ static int bramong_parse(int c, char **argv, int invert,
                        xtables_error(PARAMETER_PROBLEM,
                                      "File should only contain one line");
                optarg[flen-1] = '\0';
-               /* fall through */
+               break;
        case AMONG_DST:
-               if (c == AMONG_DST)
-                       dst = true;
+               dst = true;
                /* fall through */
        case AMONG_SRC:
                break;