qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Kewei Yu <keweihk@gmail.com>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang
Date: Wed, 1 Jan 2014 02:06:21 +0000	[thread overview]
Message-ID: <CAFEAcA8iVQWWYDLZLS60U=u=Hyd4WToG_nWtcG0ZHVs7-ELnwA@mail.gmail.com> (raw)
In-Reply-To: <CAJBZ5eP8tRvaQf6qW-zzUs_WQ2WcwTyo0i5Xz3ak8SSprU9vmQ@mail.gmail.com>

On 31 December 2013 13:29, Kewei Yu <keweihk@gmail.com> wrote:
> 2013/12/31 Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>>
>> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <keweihk@gmail.com> wrote:
>> >                                    "%s", qemu_binary, s->socket_path,
>> >                                    s->qmp_socket_path, pid_file,
>> > +                                  qtest_vnc_param ?: "",
>>
>> I do vaguely remember someone going to efforts to remove uses of "? :
>> foo" (with the blank true value).
>
>  I'm not clear the sentence's meaning.

Using the ternary operator "X ? Y : Z" with an empty 2nd operand
"X ?: Y" is not standard C. It's a GCC extension. There was a
suggestion a year or so back that we should remove the uses of
it, but the consensus was that this was unnecessary, since in
practice we rely on other GCC extensions. Clang also supports
this syntax, and it's the only other compiler we care about.

In this case it seems reasonable, especially since the line
immediately below this addition is using it too.

thanks
-- PMM

  parent reply	other threads:[~2014-01-01  2:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-31  4:42 [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang Kewei Yu
2013-12-31 12:33 ` Peter Crosthwaite
2013-12-31 13:29   ` Kewei Yu
2014-01-01  1:47     ` Kewei Yu
2014-01-01  2:06     ` Peter Maydell [this message]
2014-01-01  2:29       ` Kewei Yu
2014-01-01  4:39         ` Peter Crosthwaite
2014-01-01  4:40     ` Peter Crosthwaite
2014-01-02 14:53       ` Andreas Färber
2014-01-03  3:01         ` Kewei Yu
2014-01-03  3:04           ` Peter Crosthwaite
2014-01-02  8:15 ` Paolo Bonzini
2014-01-02  9:58   ` Kewei Yu
2014-01-02 14:45   ` Andreas Färber
2014-01-03  9:26     ` Paolo Bonzini
2014-01-06  4:29       ` Kewei Yu

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='CAFEAcA8iVQWWYDLZLS60U=u=Hyd4WToG_nWtcG0ZHVs7-ELnwA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=keweihk@gmail.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).