lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Dec 2020 21:25:01 -0800
From:   Joe Perches <joe@...ches.com>
To:     Vasyl Gomonovych <gomonovych@...il.com>, tariqt@...dia.com
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net/mlx4: Use true,false for bool variable

On Fri, 2020-12-11 at 11:05 +0100, Vasyl Gomonovych wrote:
> Fix en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable
> Fix main.c:4465:5-13: WARNING: Comparison of 0/1 to bool variable
[]
> diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
[]
> @@ -4462,7 +4462,7 @@ static int __init mlx4_verify_params(void)
>  		pr_warn("mlx4_core: log_num_vlan - obsolete module param, using %d\n",
>  			MLX4_LOG_NUM_VLANS);
>  
> 
> -	if (use_prio != 0)
> +	if (use_prio != false)
>  		pr_warn("mlx4_core: use_prio - obsolete module param, ignored\n");

Generally, assuming use_prio is bool, this would be written

	if (use_prio)
		pr_warn("etc...")


Powered by blists - more mailing lists