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:	Sun, 24 Feb 2008 13:52:36 +1030
From:	David Newall <davidn@...idnewall.com>
To:	Jan Engelhardt <jengelh@...putergmbh.de>
CC:	Ray Lee <ray-lk@...rabbit.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Krzysztof Halasa <khc@...waw.pl>,
	Adrian Bunk <bunk@...nel.org>,
	Roland Dreier <rdreier@...co.com>,
	Glenn Streiff <gstreiff@...effect.com>,
	Faisal Latif <flatif@...effect.com>,
	linux-kernel@...r.kernel.org, general@...ts.openfabrics.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Greg Kroah-Hartman <greg@...ah.com>
Subject: Re: Merging of completely unreviewed drivers

Jan Engelhardt wrote:
> static void blah(void)
> {
> 	if (foo) {
> 		bar;
> 		bar2;
> 		return;
> 	}
> 	if (this) {
> 		that;
> 		that2;
> 		return;
> 	}
> 	/* yay, got rid of two levels of indent! */
> 	good day;
> 	good day2;
> }

I like this style.  It's more readable than the alternative that you
showed.  If you hate returns mid-procedure, as some purists do, the
following is also good:

static void blah(void)
{
	if (foo) {
		bar;
		bar2;
	} else if (this) {
		that;
		that2;
	} else {
		good day;
		good day2;
	}
}

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