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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 11 Jan 2018 17:17:53 -0800
From:   Joe Perches <joe@...ches.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Greg KH <gregkh@...uxfoundation.org>
Subject: Re: checkpatch: exclude drivers/staging from if with unnecessary
 parentheses test

On Thu, 2018-01-11 at 15:03 -0800, Andrew Morton wrote:
> On Thu, 11 Jan 2018 12:53:54 -0800 Joe Perches <joe@...ches.com> wrote:
> 
> > Greg KH doesn't like this test so exclude the staging directory
> > from the implied --strict only test unless --strict is actually
> > used on the command-line.
> > 
> 
> "doesn't like" is rather vague.  What is the objection, specifically?

Unnecessary parentheses sometimes make code
easier to read for those that don't know C
very well.  i.e.: Greg and maybe others too.

> Also, an example of code which has an "if with unnecessary parentheses"
> would help others understand the decision.

	if ((foo == bar) &&
	    (baz != qux))

where the parentheses around the comparisons are
generically unnecessary as the && is a much higher
precedence than the comparisons.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ