[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m3fy7dt4wc.fsf@maximus.localdomain>
Date: Sat, 07 Apr 2007 02:16:51 +0200
From: Krzysztof Halasa <khc@...waw.pl>
To: Jan Engelhardt <jengelh@...ux01.gwdg.de>
Cc: David Brownell <david-b@...bell.net>,
Stefan Richter <stefanr@...6.in-berlin.de>,
Randy Dunlap <randy.dunlap@...cle.com>,
Tony Lindgren <tony@...mide.com>, linux-kernel@...r.kernel.org
Subject: Re: coding style for long conditions (WAS: Re: [PATCH 25/90] ... blinky leds!!)
Jan Engelhardt <jengelh@...ux01.gwdg.de> writes:
> Tabs should be used for indent, not padding. People wanting to use
> different-sized tabs can change settings in their editor, i.e.
> to make a tab 12 instead of 8. Or 6. Or whatever. If tabs only ever
> appear at the front, this works, it breaks when tabs are used to line
> up foo->bar=1; foo->boom=17; statements.
Precisely.
If someone really likes
if (a &&
b)
or
if (
a
&&
b
)
then let be it (in his/her code), but please don't fight
if (a &&
b)
Just make sure only tabs are used for indent, i.e., the last is:
\t*if (a &&
\t*\s\s\s\sb)
another example:
\t*if (condition1 && (a +
\t* b))
^^^^^^^^^^^^^^^^^^^ <<< spaces, not tabs
I think the current CodingStyle is clear enough but improvements there
aren't prohibited.
--
Krzysztof Halasa
-
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