[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fea0a7a2-7eaf-4f96-6668-e7d16ab747cf@mellanox.com>
Date: Wed, 27 Nov 2019 07:47:40 +0000
From: Paul Blakey <paulb@...lanox.com>
To: Brian Vazquez <brianvv@...gle.com>,
Brian Vazquez <brianvv.kernel@...il.com>,
David Ahern <dsahern@...il.com>,
Stephen Hemminger <stephen@...workplumber.org>
CC: Mahesh Bandewar <maheshb@...gle.com>,
Maciej Zenczykowski <maze@...gle.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH iproute2] tc: fix warning in tc/m_ct.c
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@...lanox.com>
> Fixes: c8a494314c40 ("tc: Introduce tc ct action")
> Signed-off-by: Brian Vazquez <brianvv@...gle.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.
Powered by blists - more mailing lists