> I'm a bit lost here. Are we referring to
>
> if (expr) {
> ...
> } else {
> ...
> }
>
> versus
>
> if (expr) {
> ...
> }
> else {
> ...
> }
This one is already covered by Documentation/CodingStyle (with the Justification
that this is the way that K&R do it, so it must be right).
> This is
>
> if (expr1 &&
> expr2)
>
> versus
>
> if (expr1
> && expr2)
This isn't covered ... CodingStyle merely says that long lines
should be broken into "sensible chunks". Perhaps we should add
some words about breaking long lines leaving binary operators
trailing on the end of the line (my preferred style). But the
only examples of this I could find leafing through K&R they
put the binary operator on the start of the continuation line
(could the prophets have been wrong here :-)
-Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]