From: Ani Sinha Date: Sun, 24 Oct 2021 05:40:43 +0000 (+0530) Subject: qemu: remove unused function return value X-Git-Tag: v7.9.0-rc1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54cf221b55d818e2191b0a85fe87c38f66dca093;p=thirdparty%2Flibvirt.git qemu: remove unused function return value qemuBuildPMPCIRootHotplugCommandLine() returns 0 unconditionally. There is no failure scenario at present. So clean up the code by removing integer return from the function and also remove the failure check conditional from the function call. Also fix indentation for the above function call while at it. Signed-off-by: Ani Sinha Reviewed-by: Laine Stump --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1a480c160a..7374b2beca 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3177,9 +3177,9 @@ qemuBuildSkipController(const virDomainControllerDef *controller, return false; } -static int +static void qemuBuildPMPCIRootHotplugCommandLine(virCommand *cmd, - const virDomainControllerDef *controller) + const virDomainControllerDef *controller) { if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI && controller->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT && @@ -3189,7 +3189,7 @@ qemuBuildPMPCIRootHotplugCommandLine(virCommand *cmd, virCommandAddArgFormat(cmd, "PIIX4_PM.acpi-root-pci-hotplug=%s", virTristateSwitchTypeToString(controller->opts.pciopts.hotplug)); } - return 0; + return; } static int @@ -3207,8 +3207,7 @@ qemuBuildControllersByTypeCommandLine(virCommand *cmd, if (cont->type != type) continue; - if (qemuBuildPMPCIRootHotplugCommandLine(cmd, cont)) - continue; + qemuBuildPMPCIRootHotplugCommandLine(cmd, cont); if (qemuBuildSkipController(cont, def)) continue;