Now that it's no longer needed, remove the argument. This removes the last helper variable in qemuBuildControllerDevCommandLine. Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- src/qemu/qemu_command.c | 10 ++-------- src/qemu/qemu_command.h | 3 +-- src/qemu/qemu_hotplug.c | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 22f041a956..f95231666f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2833,8 +2833,7 @@ int qemuBuildControllerDevStr(const virDomainDef *domainDef, virDomainControllerDefPtr def, virQEMUCapsPtr qemuCaps, - char **devstr, - int *nusbcontroller) + char **devstr) { virBuffer buf = VIR_BUFFER_INITIALIZER; @@ -2913,9 +2912,6 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, if (qemuBuildUSBControllerDevStr(domainDef, def, qemuCaps, &buf) == -1) goto error; - if (nusbcontroller) - *nusbcontroller += 1; - break; case VIR_DOMAIN_CONTROLLER_TYPE_PCI: { @@ -3121,7 +3117,6 @@ qemuBuildControllerDevCommandLine(virCommandPtr cmd, virQEMUCapsPtr qemuCaps) { size_t i, j; - int usbcontroller = 0; int contOrder[] = { /* * List of controller types that we add commandline args for, @@ -3184,8 +3179,7 @@ qemuBuildControllerDevCommandLine(virCommandPtr cmd, continue; } - if (qemuBuildControllerDevStr(def, cont, qemuCaps, - &devstr, &usbcontroller) < 0) + if (qemuBuildControllerDevStr(def, cont, qemuCaps, &devstr) < 0) goto cleanup; if (devstr) { diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 1a4f1f5da4..d9f8a818b5 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -117,8 +117,7 @@ char int qemuBuildControllerDevStr(const virDomainDef *domainDef, virDomainControllerDefPtr def, virQEMUCapsPtr qemuCaps, - char **devstr, - int *nusbcontroller); + char **devstr); int qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps, const char *alias, diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index a1c3ca999b..c3d935a412 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1022,7 +1022,7 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver, if (qemuAssignDeviceControllerAlias(vm->def, priv->qemuCaps, controller) < 0) goto cleanup; - if (qemuBuildControllerDevStr(vm->def, controller, priv->qemuCaps, &devstr, NULL) < 0) + if (qemuBuildControllerDevStr(vm->def, controller, priv->qemuCaps, &devstr) < 0) goto cleanup; if (!devstr) -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list