Re: kernel guide to space

From: Dmitry Torokhov
Date: Mon Jul 11 2005 - 10:51:35 EST


Hi,

On 7/11/05, Michael S. Tsirkin <mst@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/