netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][nf-next] netfilter: remove unneeded switch fall-through
@ 2019-02-22  8:58 Li RongQing
  2019-02-27 10:04 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Li RongQing @ 2019-02-22  8:58 UTC (permalink / raw)
  To: netfilter-devel

Empty case is fine and does not switch fall-through 

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 net/netfilter/nf_nat_core.c    | 2 +-
 net/netfilter/nf_tables_core.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
index 35e61038ae96..d4dd60a85328 100644
--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -182,7 +182,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);
diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c
index 2a00aef7b6d4..e56a94dff34e 100644
--- a/net/netfilter/nf_tables_core.c
+++ b/net/netfilter/nf_tables_core.c
@@ -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);
-- 
2.16.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][nf-next] netfilter: remove unneeded switch fall-through
  2019-02-22  8:58 [PATCH][nf-next] netfilter: remove unneeded switch fall-through Li RongQing
@ 2019-02-27 10:04 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2019-02-27 10:04 UTC (permalink / raw)
  To: Li RongQing; +Cc: netfilter-devel

On Fri, Feb 22, 2019 at 04:58:44PM +0800, Li RongQing wrote:
> Empty case is fine and does not switch fall-through 

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-27 10:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-22  8:58 [PATCH][nf-next] netfilter: remove unneeded switch fall-through Li RongQing
2019-02-27 10:04 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).