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]>
---
net/ipv6/ndisc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index b3cea20..936f13c 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -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);
--
2.7.4
From: "Gustavo A. R. Silva" <[email protected]>
Date: Mon, 22 Jan 2018 16:22:13 -0600
> 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]>:
> From: "Gustavo A. R. Silva" <[email protected]>
> Date: Mon, 22 Jan 2018 16:22:13 -0600
>
>> 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.
>
So "Use true and false for boolean value" would be a better subject?
Thanks
--
Gustavo
From: "Gustavo A. R. Silva" <[email protected]>
Date: Tue, 23 Jan 2018 09:21:00 -0600
>
> Quoting David Miller <[email protected]>:
>
>> From: "Gustavo A. R. Silva" <[email protected]>
>> Date: Mon, 22 Jan 2018 16:22:13 -0600
>>
>>> 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.
>>
>
> So "Use true and false for boolean value" would be a better subject?
Yes.
Quoting David Miller <[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?
>
> Yes.
I got it.
Thanks
--
Gustavo