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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070604045857.GE2161@localhost.localdomain>
Date:	Mon, 4 Jun 2007 12:58:57 +0800
From:	WANG Cong <xiyou.wangcong@...il.com>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	Randy Dunlap <rdunlap@...otime.net>,
	Al Viro <viro@....linux.org.uk>,
	LKML <linux-kernel@...r.kernel.org>, akpm@...ux-foundation.org,
	Chen Li-jun <cljun@...ou.edu.cn>,
	Wang Ya-gang <lazy_linux@....com>
Subject: Re: [RFC] Documentation/CodingStyle: Add rules for goto labels

On Sun, Jun 03, 2007 at 11:35:43AM -0400, Jeff Garzik wrote:
>Randy Dunlap wrote:
>>On Sun, 3 Jun 2007 15:29:39 +0100 Al Viro wrote:
>>
>>>On Sun, Jun 03, 2007 at 10:24:50PM +0800, WANG Cong wrote:
>>>  
>>>>+Do care when you use Lindent to indent your code, since it may use 
>>>>spaces
>>>>+instead of tabs before a goto label and it may also align the label in a
>>>>+wrong position. A goto label should be aligned in the column that is 8
>>>>+characters ahead of the statement just below this label. Please fix it 
>>>>manually
>>>>+if you find Lindent is wrong.
>>>Lindent is wrong, but the style you are advocating is, at the very
>>>least, not universal.  Equally (if not more) common is putting label
>>>in column 1, period.  Regardless of indentation level of the statement
>>>following it.
>>
>>ack Al's style.
>
>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.
>
>	Jeff

Thanks for all comments!

I just wonder, if a goto label is nested in a while/for/if/switch block, aligning it in
the first column maybe a bit ugly. (I know mostly it is not in any while/for/if/switch block.)

Regards!


WANG Cong

-
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