From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Liu Jing <liujing@cmss.chinamobile.com>
Cc: kadlec@netfilter.org, davem@davemloft.net, dsahern@kernel.org,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Simon Horman <horms@kernel.org>
Subject: Re: [PATCH] netfilter: remove unnecessary assignment in translate_table
Date: Mon, 19 Aug 2024 19:02:09 +0200 [thread overview]
Message-ID: <ZsN6kQLn9fqMpNCm@calendula> (raw)
In-Reply-To: <20240701115302.7246-1-liujing@cmss.chinamobile.com>
On Mon, Jul 01, 2024 at 07:53:02PM +0800, Liu Jing wrote:
> in translate_table, the initialized value of 'ret' is unused,
> because it will be assigned in the rear. thus remove it.
>
> Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
> ---
> net/ipv4/netfilter/ip_tables.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
> index fe89a056eb06..c9b34d7d7558 100644
> --- a/net/ipv4/netfilter/ip_tables.c
> +++ b/net/ipv4/netfilter/ip_tables.c
> @@ -664,7 +664,7 @@ translate_table(struct net *net, struct xt_table_info *newinfo, void *entry0,
> struct ipt_entry *iter;
> unsigned int *offsets;
> unsigned int i;
> - int ret = 0;
> + int ret;
ip6_tables is a copy&paste from ip_tables, so it is arp_tables.
I think all of them have the same unnecessary initialization.
Would you still post v2?
prev parent reply other threads:[~2024-08-19 17:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 11:53 [PATCH] netfilter: remove unnecessary assignment in translate_table Liu Jing
2024-07-02 9:28 ` Simon Horman
2024-08-19 17:02 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZsN6kQLn9fqMpNCm@calendula \
--to=pablo@netfilter.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liujing@cmss.chinamobile.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.