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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1509120809590.2051@localhost6.localdomain6>
Date:	Sat, 12 Sep 2015 08:10:46 +0200 (CEST)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Shraddha Barke <shraddha.6596@...il.com>
cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jes Sorensen <Jes.Sorensen@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] Staging: vt6656: Bool tests don't need comparisons



On Sat, 12 Sep 2015, Shraddha Barke wrote:

> This patch removes comparisons to true/false values on bool variables.
> Fix made using Coccinelle
> 
> Signed-off-by: Shraddha Barke <shraddha.6596@...il.com>
> ---
>  drivers/staging/vt6656/wcmd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
> index 3cbf479..ab7401e 100644
> --- a/drivers/staging/vt6656/wcmd.c
> +++ b/drivers/staging/vt6656/wcmd.c
> @@ -177,7 +177,7 @@ int vnt_schedule_command(struct vnt_private *priv, enum vnt_cmd command)
>  	ADD_ONE_WITH_WRAP_AROUND(priv->cmd_enqueue_idx, CMD_Q_SIZE);
>  	priv->free_cmd_queue--;
>  
> -	if (priv->cmd_running == false)
> +	if (priv->cmd_running)

You turned it into a test for true.  It seems strange that this would 
happen if you used a rule.

julia

>  		vnt_cmd_complete(priv);
>  
>  	return true;
> -- 
> 2.1.4
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ