From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen)
To: Roland Dreier <rdreier@cisco.com>
Cc: Mike Isely <isely@pobox.com>, Hans Verkuil <hverkuil@xs4all.nl>,
LKML <linux-kernel@vger.kernel.org>,
v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>
Subject: Re: CodingStyle question: multiple statements on a single line
Date: Wed, 3 Sep 2008 16:22:12 -0400 [thread overview]
Message-ID: <20080903202211.GG12476@csclub.uwaterloo.ca> (raw)
In-Reply-To: <adaskshvzw6.fsf@cisco.com>
On Wed, Sep 03, 2008 at 11:38:01AM -0700, Roland Dreier wrote:
> if (a) {
> b;
> }
>
> to
>
> if (a)
> b;
>
Why oh why the kernel do this stupid style?
I hate that. It makes debuging such a pain in the @#$@#$. Anytime you
want to do anything in that area you have to add back the missing '{}'
around the statement, so that you can add debug statements to the
condition.
Stupid stupid stupid!!!
It is so annoying when you accidentally break the code by trying to
debug it by doing:
if (a)
printk("Trying to do b\n");
b;
Usually kernel style makes sense, but this part is stupid, inconsistend
with how any condition with multiple statements is done, and error
prone, especially when trying to debug.
Who's stupid idea was this anyhow?
--
Len Sorensen
next prev parent reply other threads:[~2008-09-03 20:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-02 22:20 Hans Verkuil
2008-09-02 22:34 ` Roland Dreier
2008-09-02 23:50 ` Mike Isely
2008-09-03 0:23 ` Randy Dunlap
2008-09-03 12:19 ` Krzysztof Halasa
2008-09-03 18:38 ` Roland Dreier
2008-09-03 20:22 ` Lennart Sorensen [this message]
2008-09-03 12:15 ` Krzysztof Halasa
2008-09-03 6:57 ` Frans Meulenbroeks
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=20080903202211.GG12476@csclub.uwaterloo.ca \
--to=lsorense@csclub.uwaterloo.ca \
--cc=hverkuil@xs4all.nl \
--cc=isely@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdreier@cisco.com \
--cc=v4l-dvb-maintainer@linuxtv.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®