From: "George Spelvin" <linux@horizon.com>
To: joe@perches.com, linux-kernel@vger.kernel.org,
rientjes@google.com, torvalds@linux-foundation.org
Cc: linux@horizon.com
Subject: Re: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to
Date: 11 Jul 2012 04:14:19 -0400 [thread overview]
Message-ID: <20120711081419.28567.qmail@science.horizon.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 738 bytes --]
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.
next reply other threads:[~2012-07-11 8:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 8:14 George Spelvin [this message]
2012-07-11 8:52 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120711081419.28567.qmail@science.horizon.com \
--to=linux@horizon.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@google.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®