On Mon, Jul 9, 2012 at 7:35 AM, Markus Armbruster <arm...@redhat.com> wrote: > blauwir...@gmail.com writes: > >> From: Blue Swirl <blauwir...@gmail.com> >> >> Replace expr1 ?: expr2 with expr1 ? expr1 : expr2 as K&R intended. >> >> If expr1 has side effects, introduce a temporary variable. >> >> Signed-off-by: Blue Swirl <blauwir...@gmail.com> >> --- >> block.c | 6 ++++-- >> block/qcow2.c | 6 ++++-- >> bt-vhci.c | 2 +- >> hw/bt-hci.c | 5 +++-- >> hw/bt.c | 2 +- >> hw/gumstix.c | 3 ++- >> hw/omap2.c | 4 ++-- >> hw/omap_clk.c | 4 ++-- >> hw/omap_uart.c | 4 ++-- >> hw/onenand.c | 9 +++++---- >> hw/qdev-addr.c | 2 +- >> hw/qdev-monitor.c | 3 ++- >> hw/qdev-properties.c | 4 ++-- >> hw/qdev.c | 3 ++- >> hw/scsi-disk.c | 3 ++- >> hw/tsc210x.c | 7 +++++-- >> hw/usb/dev-hub.c | 2 +- >> hw/wm8750.c | 9 ++++++--- >> hw/xen_disk.c | 4 +++- >> path.c | 5 ++++- >> tests/libqtest.c | 2 +- >> vl.c | 3 ++- >> 22 files changed, 57 insertions(+), 35 deletions(-) > > Practical benefits?
Improved C99 compliance. ?: isn't in C11 either, unlike for example anonymous unions.