|
From: | Kewei Yu |
Subject: | Re: [Qemu-devel] [PATCH v2 1/1] qtest: Fix the bug about disabling vnc causes "make check" hang |
Date: | Wed, 1 Jan 2014 10:29:28 +0800 |
On 31 December 2013 13:29, Kewei Yu <address@hidden> wrote:
> 2013/12/31 Peter Crosthwaite <address@hidden>
>>
>> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <address@hidden> wrote:
>> > "%s", qemu_binary, s->socket_path,Using the ternary operator "X ? Y : Z" with an empty 2nd operand
>> > 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.
"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
[Prev in Thread] | Current Thread | [Next in Thread] |