Re: coding style for long conditions (WAS: Re: [PATCH 25/90] ... blinky leds!!)

Jan Engelhardt
2007-04-06T23:52:36Z

On Apr 6 2007 15:40, David Brownell wrote:
>> > if (...) {
>> > THAT WAS ONE MORE TAB
>> > }
>> >
>> >Come on, stop wasting everyone's time with utter nonsense.
>> I was never debating these two things.
>Actually, you did.

If it was perceived I did, then I owe you an apology.

>Go back and see the point I was specifically
>disagreeing with. It related to the body of the "if" block,
>which you had said would **NOT** indent by a single tab.

Ok somewhere is a bug. What is the body an if block, for you? To avoid
that confusion, I termed these "condition" and "code":

if(condition1 || /* if() line */
condition2) { /* continuation line */
code; /* body */
code; /* body */
}

And I think I made that pretty clear in <http://lkml.org/lkml/2007/4/5/293>,
which part is what, and how I like things.
In <http://lkml.org/lkml/2007/4/6/133>, the loop begins then.
Yes, it does not match "(a) only use tabs", but it matches the
rest of kernel code.

Jan
--