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, 05 Jun 2007 11:16:13 +0200
From:	Rene Herman <rene.herman@...il.com>
To:	WANG Cong <xiyou.wangcong@...il.com>
CC:	Jeff Garzik <jeff@...zik.org>, "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,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [RFC] Documentation/CodingStyle: Add rules for goto labels

On 06/05/2007 04:10 AM, WANG Cong wrote:

> On Mon, Jun 04, 2007 at 01:57:51PM -0400, Jeff Garzik wrote:

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

> Hmmm, perhaps.
> 
> So, it seems that we can reach an agreement. Any other comments or
> suggestions?

One more -- I absolutely agree with Jeff that goto should stand out as best as 
possible but I think that's actually more so when they're indented 2 columns.

Have been working on a legacy CD-ROM driver lately and puting "out:" labels at 2 
spaces started out as a personal style preference of Pekka Enberg (I used to put 
them at 0) but has grown on me. It makes them clearly fall inside the function, 
  not being aligned at the same level as the next function header, which makes 
for the "lowest effort visual scan" of all I feel. One is just too little for 
that, more than 2 is too much...

Here's the last version that was posted:

http://lkml.org/lkml/2007/6/4/50

It gets a little different visually when labels are mostly longer than a simple 
"out" or "again", or "error" or something like that but if someone's going to 
try to pin down the label style, I'd like the freedom to have two spaces in 
front of them...

Rene.

P.S: Your message had a Mail-Followup-To set which dropped yourself and turned 
the others from CCs into TOs. If you can help it, please no header tricks.
-
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