lkml.org 
[lkml]   [2012]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to
Unser geliebter Führer schreib:
> sizeof without parenthesis is an abomination, and should never be used.

Huh. I prefer sizeof without parens, like I prefer return without parens.

It actually annoys me when I see someone write

return(0);

Because it's not a function (our language is too low-level to use
continuation-passing style), it's magic syntax.

Sizeof likewise. I tend to use "p = malloc(sizeof *p)" a lot.
It just reads more nicely, to my eyes, than "p = malloc(sizeof(*p))".

If I wanted my code to be cluttered with parens, I'd write it in
Lots of Irritating Silly Parenthese.


Certainly, tha paren-less style is all over the kernel. It's heavily
used in arch/x86/boot, for example.

I guess it's what you're used to.
--
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: 2012-07-11 11:01    [W:0.031 / U:37.504 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site