From: Paul Blakey <paulb@mellanox.com>
To: Brian Vazquez <brianvv@google.com>,
Brian Vazquez <brianvv.kernel@gmail.com>,
David Ahern <dsahern@gmail.com>,
Stephen Hemminger <stephen@networkplumber.org>
Cc: Mahesh Bandewar <maheshb@google.com>,
Maciej Zenczykowski <maze@google.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH iproute2] tc: fix warning in tc/m_ct.c
Date: Wed, 27 Nov 2019 07:47:40 +0000 [thread overview]
Message-ID: <fea0a7a2-7eaf-4f96-6668-e7d16ab747cf@mellanox.com> (raw)
In-Reply-To: <20191127051934.158900-1-brianvv@google.com>
On 11/27/2019 7:19 AM, Brian Vazquez wrote:
> Warning was:
> m_ct.c:370:13: warning: variable 'nat' is used uninitialized whenever
> 'if' condition is false
>
> Cc: Paul Blakey <paulb@mellanox.com>
> Fixes: c8a494314c40 ("tc: Introduce tc ct action")
> Signed-off-by: Brian Vazquez <brianvv@google.com>
> ---
> tc/m_ct.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tc/m_ct.c b/tc/m_ct.c
> index 8df2f610..45fa4a8c 100644
> --- a/tc/m_ct.c
> +++ b/tc/m_ct.c
> @@ -359,7 +359,7 @@ static void ct_print_nat(int ct_action, struct rtattr **tb)
> {
> size_t done = 0;
> char out[256] = "";
> - bool nat;
> + bool nat = false;
>
> if (!(ct_action & TCA_CT_ACT_NAT))
> return;
Yes nat should be false here.
Looks good to me.
Thanks.
next prev parent reply other threads:[~2019-11-27 7:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-27 5:19 [PATCH iproute2] tc: fix warning in tc/m_ct.c Brian Vazquez
2019-11-27 7:47 ` Paul Blakey [this message]
2019-12-04 19:37 ` Stephen Hemminger
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=fea0a7a2-7eaf-4f96-6668-e7d16ab747cf@mellanox.com \
--to=paulb@mellanox.com \
--cc=brianvv.kernel@gmail.com \
--cc=brianvv@google.com \
--cc=dsahern@gmail.com \
--cc=maheshb@google.com \
--cc=maze@google.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/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 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).