qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT ccb8efc] net: Avoid gcc'ism in net_host_device_ad


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT ccb8efc] net: Avoid gcc'ism in net_host_device_add
Date: Fri, 01 May 2009 15:05:16 -0000

From: Jan Kiszka <address@hidden>

>> +    if (net_client_init(device, opts ? : "") < 0) {
>
> Is this a gcc extension?  Do we want to introduce this construct to the
> code base.

Valid remark, fix below.

Thanks,
Jan

-------->

Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/net.c b/net.c
index 7ae1e6d..f1752d6 100644
--- a/net.c
+++ b/net.c
@@ -2085,7 +2085,7 @@ void net_host_device_add(Monitor *mon, const char 
*device, const char *opts)
         monitor_printf(mon, "invalid host network device %s\n", device);
         return;
     }
-    if (net_client_init(device, opts ? : "") < 0) {
+    if (net_client_init(device, opts ? opts : "") < 0) {
         monitor_printf(mon, "adding host network device %s failed\n", device);
     }
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]