Skip to content

Commit

Permalink
netfilter: remove unneeded switch fall-through
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li RongQing authored and Pablo Neira Ayuso committed Feb 27, 2019
1 parent cc16921 commit 35acfba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion net/netfilter/nf_nat_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion net/netfilter/nf_tables_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ nft_do_chain(struct nft_pktinfo *pkt, void *priv)
chain = regs.verdict.chain;
goto do_chain;
case NFT_CONTINUE:
/* fall through */
case NFT_RETURN:
nft_trace_packet(&info, chain, rule,
NFT_TRACETYPE_RETURN);
Expand Down

0 comments on commit 35acfba

Please sign in to comment.