lkml.org 
[lkml]   [2005]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel guide to space
Hi,

On 7/11/05, Michael S. Tsirkin <mst@mellanox.co.il> wrote:

> 3e. sizeof
> space after the operator
> sizeof a

If braces are used no spaces please : sizeof(struct foo)

>
> 4c. Breaking long lines
> Descendants are always substantially shorter than the parent
> and are placed substantially to the right.
> Documentation/CodingStyle
>
> Descendant must be indented at least to the level of the innermost
> compound expression in the parent. All descendants at the same level
> are indented the same.
> if (foobar(.................................) + barbar * foobar(bar +
> foo *
> oof)) {
> }

Ugh, that's as ugly as it can get... Something like below is much
easier to read...

if (foobar(.................................) +
barbar * foobar(bar + foo * oof)) {
}
--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-11 17:53    [from the cache]
©2003-2011 Jasper Spaans