tc: fix warning in tc/m_ct.c
Subsystems (2)
PATCH 1/1 tc: fix warning in tc/m_ct.c
Warning was:
m_ct.c:370:13: warning: variable 'nat' is used uninitialized whenever 'if' condition is false
Cc Paul Blakey <[email protected]>
Fixes c8a494314c40 ("tc: Introduce tc ct action")
Signed-off-by Brian Vazquez <[email protected]>
--- tc/m_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tc/m_ct.c +1 -1
@@ -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 ;
Signature · 1 line
2.24.0.432.g9d3f5f5b63-goog
Quoted 16 lines · Brian Vazquez
Warning was:
m_ct.c:370:13: warning: variable 'nat' is used uninitialized whenever 'if' condition is falseCc Paul Blakey <[email protected]>Fixes c8a494314c40 ("tc: Introduce tc ct action")Signed-off-by Brian Vazquez <[email protected]>--- tc/m_ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tc/m_ct.c +0
-0
tc/m_ct.c static void ct_print_nat(int ct_action, struct rtattr **tb) · line 365
Quoted 8 lines
tc/m_ct.c +1
-1@@ -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.
Stephen Hemminger
AppliedQuoted 8 lines · On Tue, 26 Nov 2019 21:19:34 -0800 Brian Vazquez <[email protected]> wrote:
Warning was:
m_ct.c:370:13: warning: variable 'nat' is used uninitialized whenever 'if' condition is falseCc Paul Blakey <[email protected]>Fixes c8a494314c40 ("tc: Introduce tc ct action")Signed-off-by Brian Vazquez <[email protected]>---
Applied