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:	Mon, 04 Jun 2007 13:54:30 -0400
From:	Valdis.Kletnieks@...edu
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Jan Engelhardt <jengelh@...ux01.gwdg.de>,
	Jeff Garzik <jeff@...zik.org>,
	Randy Dunlap <rdunlap@...otime.net>,
	Al Viro <viro@....linux.org.uk>,
	LKML <linux-kernel@...r.kernel.org>, akpm@...ux-foundation.org
Subject: Re: [RFC] Documentation/CodingStyle: Add rules for goto labels

On Mon, 04 Jun 2007 10:43:51 PDT, "H. Peter Anvin" said:
> Jan Engelhardt wrote:
> > But gotos are special. ("Evil" minus the "it's good for unrolling in case of an
> > error" case).

> So?
> 
> You still want them to be associated with the level the bailout happens at.

No, you want them associated with the level you bail out *TO*.  Otherwise you
get this:

	...
	...
	if (..) {
		if (..) {
			goto ka_blammo;
	...
	foo = yadda_yadda(.....);
	kfree(bar->some_struct);
			ka_blammo:
	/* continue with cleanup here */

Goto labels belong in column 1.  Or 2 if you believe in the existence of 'diff
-p' that get confused by col-1 labels.


Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ