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:	Tue, 5 Jun 2007 10:10:27 +0800
From:	WANG Cong <xiyou.wangcong@...il.com>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Jan Engelhardt <jengelh@...ux01.gwdg.de>,
	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, Jun 04, 2007 at 01:57:51PM -0400, Jeff Garzik wrote:
>On Mon, Jun 04, 2007 at 10:43:51AM -0700, H. Peter Anvin wrote:
>> Jan Engelhardt wrote:
>> > On Jun 4 2007 10:27, H. Peter Anvin wrote:
>> >> Jeff Garzik wrote:
>> >>> Seconded.  All my code contains the goto label in the first column.
>> >>>
>> >>> IMO any other goto label indentation is silly, because it obscures the
>> >>> goto label within the code block.
>> >> I would have to disagree with this.  IMNSHO, a goto label is like a case
>> >> label, and they should be treated the same way.
>> > 
>> > 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.
>
>A matter of opinion :)  I tend to think goto is special enough to
>warrant column 1 unconditionally.  It is special, so it draws additional
>attention over and above case labels.
>
>I and others have been tripped up when programmers "hide" goto
>statements among regular statements.
>
>IMO goto warrants a big flashing "notice me" sign.
>
>	Jeff

Hmmm, perhaps.

So, it seems that we can reach an agreement. Any other comments or suggestions?
Or can someone ack/merge this patch?

Thanks!

-
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