netfilter: remove unneeded switch fall-through
authorLi RongQing <lirongqing@baidu.com>
Fri, 22 Feb 2019 08:58:44 +0000 (16:58 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 27 Feb 2019 10:03:59 +0000 (11:03 +0100)
Empty case is fine and does not switch fall-through

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_nat_core.c
net/netfilter/nf_tables_core.c

index 11acd73676234d18cb66b4bf32124d659bc0de0f..af7dc65377584d26f4b5d98ef55dd06f93d8107d 100644 (file)
@@ -240,7 +240,7 @@ static bool l4proto_in_range(const struct nf_conntrack_tuple *tuple,
        __be16 port;
 
        switch (tuple->dst.protonum) {
-       case IPPROTO_ICMP: /* fallthrough */
+       case IPPROTO_ICMP:
        case IPPROTO_ICMPV6:
                return ntohs(tuple->src.u.icmp.id) >= ntohs(min->icmp.id) &&
                       ntohs(tuple->src.u.icmp.id) <= ntohs(max->icmp.id);
index 2a00aef7b6d4aaabfc538f24b0c36b50f76ce2b4..e56a94dff34e9e3bb9ed3617c3d36dd9110bc3f5 100644 (file)
@@ -221,7 +221,6 @@ next_rule:
                chain = regs.verdict.chain;
                goto do_chain;
        case NFT_CONTINUE:
-               /* fall through */
        case NFT_RETURN:
                nft_trace_packet(&info, chain, rule,
                                 NFT_TRACETYPE_RETURN);