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:   Sat, 10 Sep 2016 11:51:53 -0700
From:   Joe Perches <joe@...ches.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        Nicolai Stange <nicstange@...il.com>
Cc:     John Stultz <john.stultz@...aro.org>, linux-kernel@...r.kernel.org
Subject: Re: [RFC v6 01/23] clocksource: sh_cmt: compute rate before
 registration again

On Sat, 2016-09-10 at 14:56 +0200, Thomas Gleixner wrote:
>	if (foo)
> 		bar(foo->something, foo->somemore, foo->other,
> 		    CONST);)
> 	else
> 		rab();
> 
> 
> Is NOT. Simply because the pattern of a 'if ()' condition without braces
> suggests a single line statement to follow. Then the reading flow stops
> because there is more than one line. While:

> 	if (foo) {
> 		bar(foo->something, foo->somemore, foo->other,
> 		    CONST);)
> 	} else {
> 		rab();
> 	}

While I mostly agree, CodingStyle says:

------------------------------------------------------

Do not unnecessarily use braces where a single statement will do.

	if (condition)
		action();

and

	if (condition)
		do_this();
	else
		do_that();

------------------------------------------------------

Perhaps that should be "with single line statements" instead.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ