On 31 December 2013 13:29, Kewei Yu <kewe...@gmail.com> wrote: > 2013/12/31 Peter Crosthwaite <peter.crosthwa...@xilinx.com> >> >> On Tue, Dec 31, 2013 at 2:42 PM, Kewei Yu <kewe...@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