Now all the helper variables and code are not needed.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 2bede03e35..68e8030929 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1188,9 +1188,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
char **tapfdName = NULL;
int *tapfd = NULL;
size_t tapfdSize = 0;
- char **vhostfdName = NULL;
- int *vhostfd = NULL;
- size_t vhostfdSize = 0;
g_autoptr(virJSONValue) nicprops = NULL;
g_autoptr(virJSONValue) netprops = NULL;
int ret = -1;
@@ -1423,14 +1420,10 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
}
tapfdName = g_new0(char *, tapfdSize);
- vhostfdName = g_new0(char *, vhostfdSize);
for (i = 0; i < tapfdSize; i++)
tapfdName[i] = g_strdup_printf("fd-%s%zu", net->info.alias, i);
- for (i = 0; i < vhostfdSize; i++)
- vhostfdName[i] = g_strdup_printf("vhostfd-%s%zu", net->info.alias,
i);
-
if (!(netprops = qemuBuildHostNetProps(net,
tapfdName, tapfdSize,
NULL, 0,
@@ -1481,8 +1474,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
for (i = 0; i < tapfdSize; i++)
VIR_FORCE_CLOSE(tapfd[i]);
- for (i = 0; i < vhostfdSize; i++)
- VIR_FORCE_CLOSE(vhostfd[i]);
if (!(nicprops = qemuBuildNicDevProps(vm->def, net, priv->qemuCaps)))
goto try_remove;
@@ -1584,13 +1575,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
}
VIR_FREE(tapfd);
VIR_FREE(tapfdName);
- for (i = 0; vhostfd && i < vhostfdSize; i++) {
- VIR_FORCE_CLOSE(vhostfd[i]);
- if (vhostfdName)
- VIR_FREE(vhostfdName[i]);
- }
- VIR_FREE(vhostfd);
- VIR_FREE(vhostfdName);
virDomainCCWAddressSetFree(ccwaddrs);
VIR_FORCE_CLOSE(slirpfd);
--
2.35.1