net: ipv6: ndisc: fix bool assignment in ndisc_send_na
Subsystems (3)
PATCH 1/1 net: ipv6: ndisc: fix bool assignment in ndisc_send_na
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
--- net/ipv6/ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/ndisc.c +1 -1
@@ -527,7 +527,7 @@ void ndisc_send_na(struct net_device *dev, const struct in6_addr *daddr, }if (!dev->addr_len) - inc_opt =0 ; + inc_opt = false;if (inc_opt) optlen +=ndisc_opt_addr_space (dev,NDISC_NEIGHBOUR_ADVERTISEMENT );
Signature · 1 line
2.7.4
David Miller
maintainerFrom: "Gustavo A. R. Silva" <[email protected]>
Date: Mon, 22 Jan 2018 16:22:13 -0600
Quoted 6 lines
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Fixes 1cb3fe513f62 ("ndisc: Break down ndisc_build_skb() and build message directly.")Signed-off-by Gustavo A. R. Silva <[email protected]>
Please don't use the word "fix".
'0' is the same as 'false', it's just that the latter is more consistent type wise.
You aren't fixing any bugs with these changes at all.
Quoting David Miller <[email protected]>:
Quoted 7 lines
From: "Gustavo A. R. Silva" <[email protected]>
Date: Mon, 22 Jan 2018 16:22:13 -0600Quoted 4 lines
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Quoted 8 lines
Quoted 2 lines
Fixes 1cb3fe513f62 ("ndisc: Break down ndisc_build_skb() and build message directly.")Signed-off-by Gustavo A. R. Silva <[email protected]>Please don't use the word "fix".
'0' is the same as 'false', it's just that the latter is more consistent type wise.
So "Use true and false for boolean value" would be a better subject?
Thanks
--
Gustavo
David Miller
maintainerFrom: "Gustavo A. R. Silva" <[email protected]>
Date: Tue, 23 Jan 2018 09:21:00 -0600
Quoted 14 lines
Quoting David Miller <[email protected]>:
Quoted 11 lines
From: "Gustavo A. R. Silva" <[email protected]>
Date: Mon, 22 Jan 2018 16:22:13 -0600Quoted 7 lines
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Fixes 1cb3fe513f62 ("ndisc: Break down ndisc_build_skb() and buildmessage directly.")
Signed-off-by Gustavo A. R. Silva <[email protected]>
Quoted 7 lines
Quoted 5 lines
Please don't use the word "fix".
'0' is the same as 'false', it's just that the latter is more consistent type wise.
So "Use true and false for boolean value" would be a better subject?
Yes.
Quoting David Miller <[email protected]>:
[..]
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines
Please don't use the word "fix".
'0' is the same as 'false', it's just that the latter is more consistent type wise.
So "Use true and false for boolean value" would be a better subject?
Yes.
I got it.
Thanks
--
Gustavo