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]
Date:   Fri, 17 Feb 2017 14:50:48 -0800
From:   Joe Perches <joe@...ches.com>
To:     Shiva Kerdel <shiva@...ev.nl>, gregkh@...uxfoundation.org
Cc:     wsa+renesas@...g-engineering.com, p.hoefflin@...teo.de,
        karniksayli1995@...il.com, sabitha.george@...il.com,
        georgiana.chelu93@...il.com, goudapatilk@...il.com,
        mihaela.muraru21@...il.com, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: ks7010: ks_*: Braces should be used on all
 arms of these statements

On Fri, 2017-02-17 at 22:41 +0100, Shiva Kerdel wrote:
> Braces should be used on all arms of these statements (CHECK)..
[]
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
[]
> @@ -2148,8 +2148,9 @@ void hostif_sme_mode_setup(struct ks_wlan_private *priv)
>  				else
>  					rate_octet[i] =
>  					    priv->reg.rate_set.body[i];
> -			} else
> +			} else {
>  				break;
> +			}

Generally, any time you see a form like this,
the test should be reversed

	for/while/do {
		if (foo) {
			[bar...]
		} else {
			break;
		}
	
should be:

	for/while/do {
		if (!foo)
			break;
		[bar...]
	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ