This function is never called for VIR_DOMAIN_NET_TYPE_HOSTDEV,
and the dead code comment agrees.

Introduced by commit 1dcbef8a.
---
 src/qemu/qemu_command.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 19ee652..adeb906 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3722,11 +3722,6 @@ qemuBuildHostNetStr(virDomainNetDefPtr net,
         virBufferAsprintf(&buf, "user%c", type_sep);
         break;
 
-    case VIR_DOMAIN_NET_TYPE_HOSTDEV:
-        /* Should have been handled earlier via PCI/USB hotplug code. */
-        virObjectUnref(cfg);
-        return NULL;
-
     case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
         virBufferAsprintf(&buf, "vhost-user%cchardev=char%s,",
                           type_sep,
@@ -3736,6 +3731,8 @@ qemuBuildHostNetStr(virDomainNetDefPtr net,
                               net->driver.virtio.queues);
         break;
 
+    case VIR_DOMAIN_NET_TYPE_HOSTDEV:
+        /* Should have been handled earlier via PCI/USB hotplug code. */
     case VIR_DOMAIN_NET_TYPE_INTERNAL:
         /* Not supported by QEMU driver */
     case VIR_DOMAIN_NET_TYPE_LAST:
-- 
2.7.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to