[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080903202211.GG12476@csclub.uwaterloo.ca>
Date: Wed, 3 Sep 2008 16:22:12 -0400
From: lsorense@...lub.uwaterloo.ca (Lennart Sorensen)
To: Roland Dreier <rdreier@...co.com>
Cc: Mike Isely <isely@...ox.com>, Hans Verkuil <hverkuil@...all.nl>,
LKML <linux-kernel@...r.kernel.org>,
v4l-dvb maintainer list <v4l-dvb-maintainer@...uxtv.org>
Subject: Re: CodingStyle question: multiple statements on a single line
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
--
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