lkml.org 
[lkml]   [2004]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Lindent fixed to match reality
On Thu, Jan 29, 2004 at 09:15:56PM +0100, David Weinehall wrote:

> > b) (no -bs) "sizeof(foo)" rather than "sizeof (foo)"
>
> I can't really see the logic in this, though I know a lot of people do
> it. I try to stay consistent, thus I do:
>
> if ()
> for ()
> case ()
> while ()
> sizeof ()
> typeof ()
>
> since they're all parts of the language, rather than
> functions/macros or invocations of such.

As you say, this is religion. Secondly, there need not be any logic.
But thirdly, if you insist: The first four are about flow of control.
We all agree they have spaces - it is Linux kernel standard.

On the other hand, sizeof is an arithmetical expression, often part
of larger expressions. Now expressions like
sizeof (*foo)+1
might be confusing, and
sizeof(*foo) + 1
shows more clearly what the parsing is.

Andries
-
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-03-22 14:00    [W:0.485 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site