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: <20110104164414.GX5875@const.bordeaux.inria.fr>
Date:	Tue, 4 Jan 2011 17:44:14 +0100
From:	Samuel Thibault <samuel.thibault@...-lyon.org>
To:	"J. Bruce Fields" <bfields@...ldses.org>
Cc:	Dan Carpenter <error27@...il.com>,
	Andy Whitcroft <apw@...onical.com>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
	joe@...ches.com
Subject: Re: [patch] checkpatch: putting the && or || on the wrong line

J. Bruce Fields, le Tue 04 Jan 2011 11:38:36 -0500, a écrit :
> On Tue, Jan 04, 2011 at 08:59:00AM +0300, Dan Carpenter wrote:
> > This patch makes checkpatch.pl complain if you break up conditions in
> > the wrong way.
> > 
> > Wrong:
> > 	if ((really_long_condition)
> > 		&& (second_condition)) { ...
> > Right:
> > 	if ((really_long_condition) &&
> > 		(second_condition)) { ...
> 
> As far as I can tell, the convention in mathematical typesetting is to
> put operators on the left, not the right.  When the conditions are short
> of there are more lines, that allows you to left-align on the repeated
> operator.

I personnally find the left approach more readable.

Samuel
--
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