From ea4c9cf897af6765aadc633c7c206d866decf458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Fri, 14 Oct 2016 16:17:06 +0200 Subject: [PATCH] qemuBuildHostNetStr: remove dead code 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 76c5bcb4f9..20a26ceaed 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3723,11 +3723,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, @@ -3737,6 +3732,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_LAST: break; }