All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netfilter: osf: remove unreachable break in nf_osf_ttl()
@ 2026-08-21  2:28 Linkui Xiao
  2026-08-21  9:32 ` Pablo Neira Ayuso
  2026-08-21  9:50 ` Xuanqiang Luo
  0 siblings, 2 replies; 3+ messages in thread
From: Linkui Xiao @ 2026-08-21  2:28 UTC (permalink / raw)
  To: pablo, fw, phil, davem, edumazet, kuba, pabeni, horms
  Cc: netfilter-devel, coreteam, netdev, Linkui Xiao

From: Linkui Xiao <xiaolinkui@kylinos.cn>

In nf_osf_ttl(), the break statement after return in NF_OSF_TTL_TRUE
case is unreachable dead‑code. The return statement exits the function
immediately, so break will never execute.

Remove the useless break, no functional change.

Signed-off-by: Linkui Xiao <xiaolinkui@kylinos.cn>
---
 net/netfilter/nfnetlink_osf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/netfilter/nfnetlink_osf.c b/net/netfilter/nfnetlink_osf.c
index 92002079f8ea..a3f855905d52 100644
--- a/net/netfilter/nfnetlink_osf.c
+++ b/net/netfilter/nfnetlink_osf.c
@@ -36,7 +36,6 @@ static inline int nf_osf_ttl(const struct sk_buff *skb,
 	switch (ttl_check) {
 	case NF_OSF_TTL_TRUE:
 		return ip->ttl == f_ttl;
-		break;
 	case NF_OSF_TTL_NOCHECK:
 		return 1;
 	case NF_OSF_TTL_LESS:
-- 
2.25.1


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

end of thread, other threads:[~2026-08-21  9:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21  2:28 [PATCH] netfilter: osf: remove unreachable break in nf_osf_ttl() Linkui Xiao
2026-08-21  9:32 ` Pablo Neira Ayuso
2026-08-21  9:50 ` Xuanqiang Luo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.