Re: [PATCH] netfilter: osf: remove unreachable break in nf_osf_ttl()

Pablo Neira Ayuso <[email protected]>
Newsgroups org.kernel.vger.netdev,org.kernel.vger.netfilter-devel
Message-ID <aogbQZyLQonPE-GV@chamomile>
On Fri, Aug 21, 2026 at 10:28:17AM +0800, Linkui Xiao wrote:
> From: Linkui Xiao <[email protected]>
> 
> 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 <[email protected]>
> ---
>  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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.