* [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* Re: [PATCH] netfilter: osf: remove unreachable break in nf_osf_ttl()
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
1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2026-08-21 9:32 UTC (permalink / raw)
To: Linkui Xiao
Cc: fw, phil, davem, edumazet, kuba, pabeni, horms, netfilter-devel,
coreteam, netdev, Linkui Xiao
On Fri, Aug 21, 2026 at 10:28:17AM +0800, Linkui Xiao wrote:
> 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.
Please, use [PATCH nf-next] to specify this goes to the netfilter tree.
Thanks.
> 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 [flat|nested] 3+ messages in thread* Re: [PATCH] netfilter: osf: remove unreachable break in nf_osf_ttl()
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
1 sibling, 0 replies; 3+ messages in thread
From: Xuanqiang Luo @ 2026-08-21 9:50 UTC (permalink / raw)
To: Linkui Xiao
Cc: netfilter-devel, coreteam, netdev, Linkui Xiao, pablo, fw, phil,
davem, edumazet, kuba, pabeni, horms
在 2026/8/21 10:28, 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>
Reviewed-by: Xuanqiang Luo<luoxuanqiang@kylinos.cn>
Thanks,
Xuanqiang
^ permalink raw reply [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.