提交 206ab6e0 编写于 作者: J Jan Kiszka 提交者: Anthony Liguori

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: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 0fc8e0ec
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册