2018-03-05 22:46:53

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH] tipc: bcast: use true and false for boolean values

Assign true or false to boolean variables instead of an integer value.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
net/tipc/bcast.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 37892b3..f371117 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -574,5 +574,5 @@ void tipc_nlist_purge(struct tipc_nlist *nl)
{
tipc_dest_list_purge(&nl->list);
nl->remote = 0;
- nl->local = 0;
+ nl->local = false;
}
--
2.7.4



2018-03-06 03:16:18

by Ying Xue

[permalink] [raw]
Subject: Re: [PATCH] tipc: bcast: use true and false for boolean values

On 03/06/2018 05:56 AM, Gustavo A. R. Silva wrote:
> Assign true or false to boolean variables instead of an integer value.
>
> This issue was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Acked-by: Ying Xue <[email protected]>

> ---
> net/tipc/bcast.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
> index 37892b3..f371117 100644
> --- a/net/tipc/bcast.c
> +++ b/net/tipc/bcast.c
> @@ -574,5 +574,5 @@ void tipc_nlist_purge(struct tipc_nlist *nl)
> {
> tipc_dest_list_purge(&nl->list);
> nl->remote = 0;
> - nl->local = 0;
> + nl->local = false;
> }
>

2018-03-07 17:21:57

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] tipc: bcast: use true and false for boolean values

From: "Gustavo A. R. Silva" <[email protected]>
Date: Mon, 5 Mar 2018 15:56:14 -0600

> Assign true or false to boolean variables instead of an integer value.
>
> This issue was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Applied.