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 <ani@xxxxxxxxxxx> --- src/qemu/qemu_command.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d6df50ec73..093d8ae62c 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; -- 2.25.1