From: Larry Finger <Larry.Finger@lwfinger.net>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: stefano.brivio@polimi.it, linux-wireless@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] B43: misplaced parentheses?
Date: Sun, 15 Feb 2009 11:05:52 -0600 [thread overview]
Message-ID: <49984B70.4080007@lwfinger.net> (raw)
In-Reply-To: <499844E7.1040307@gmail.com>
Roel Kluin wrote:
> - | (rfatt->with_padmix) ? txctl_value : 0);
> + | (rfatt->with_padmix ? txctl_value : 0));
As I see it, the difference between the above two lines is the same as the
difference between c and d in this program:
int main(int argc, char **argv)
{
int a = 1, b = 2, c, d;
c = (a) ? b : 0;
d = (a ? b : 0);
fprintf (stderr, "a, b, c, d: %d %d %d %d\n", a, b, c, d);
return 1;
}
When this program is executed, the output line is
a, b, c, d: 1 2 2 2
which is what I expected. Thus "(condition) ? result1 : result2" is the same as
"(condition ? result1 : result2)".
Larry
next prev parent reply other threads:[~2009-02-15 17:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-15 16:37 [PATCH] B43: misplaced parentheses? Roel Kluin
2009-02-15 16:46 ` Michael Buesch
2009-02-15 16:59 ` Michael Buesch
2009-02-15 17:05 ` Larry Finger [this message]
2009-02-15 17:07 ` Michael Buesch
2009-02-15 17:09 ` Larry Finger
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=49984B70.4080007@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=akpm@linux-foundation.org \
--cc=linux-wireless@vger.kernel.org \
--cc=roel.kluin@gmail.com \
--cc=stefano.brivio@polimi.it \
/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;
as well as URLs for NNTP newsgroup(s).