From: Ben Collins <ben.collins@ubuntu.com>
To: Roland Dreier <rdreier@cisco.com>
Cc: Al Viro <viro@ftp.linux.org.uk>,
Linus Torvalds <torvalds@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros
Date: Thu, 14 Dec 2006 09:24:19 -0500 [thread overview]
Message-ID: <1166106259.6748.217.camel@gullible> (raw)
In-Reply-To: <ada4pryq5ts.fsf@cisco.com>
On Wed, 2006-12-13 at 23:45 -0800, Roland Dreier wrote:
> > IOW, do ; while(0) / do { } while (0) is not a proper way to do a macro
> > that imitates a function returning void.
> >
> > Objections?
>
> None from me, although the ternary ? : is a pretty odd way to write
>
> if (blah)
> do_this_void_function();
> else
> do_that_void_function();
>
> so I'm in favor of that half of the patch anyway. It's my fault for
> not noticing that part of the patch in the first place.
>
> Changing the non-void ? : constructions is just churn, but there's no
> sense changing it again now that the patch is merged.
The rest of it was just for consistency sake.
next prev parent reply other threads:[~2006-12-14 14:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-14 3:10 [PATCH 2.6.20-rc1] ib_verbs: Use explicit if-else statements to avoid errors with do-while macros Ben Collins
2006-12-14 6:16 ` Roland Dreier
2006-12-14 6:44 ` Al Viro
2006-12-14 6:56 ` Al Viro
2006-12-14 7:45 ` Roland Dreier
2006-12-14 14:24 ` Ben Collins [this message]
2006-12-14 9:08 ` Andrew Morton
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=1166106259.6748.217.camel@gullible \
--to=ben.collins@ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdreier@cisco.com \
--cc=torvalds@osdl.org \
--cc=viro@ftp.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.