Commit 206ab6e090eeddce71372041454d50d93a63017d
Committed by
Anthony Liguori
1 parent
0fc8e0ec
net: Avoid gcc'ism in net_host_device_add
>> + 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 <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
1 additions
and
1 deletions
net.c
| ... | ... | @@ -2085,7 +2085,7 @@ void net_host_device_add(Monitor *mon, const char *device, const char *opts) |
| 2085 | 2085 | monitor_printf(mon, "invalid host network device %s\n", device); |
| 2086 | 2086 | return; |
| 2087 | 2087 | } |
| 2088 | - if (net_client_init(device, opts ? : "") < 0) { | |
| 2088 | + if (net_client_init(device, opts ? opts : "") < 0) { | |
| 2089 | 2089 | monitor_printf(mon, "adding host network device %s failed\n", device); |
| 2090 | 2090 | } |
| 2091 | 2091 | } | ... | ... |