]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: remove unused function return value
authorAni Sinha <ani@anisinha.ca>
Sun, 24 Oct 2021 05:40:43 +0000 (11:10 +0530)
committerLaine Stump <laine@redhat.com>
Tue, 26 Oct 2021 03:43:31 +0000 (23:43 -0400)
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@anisinha.ca>
Reviewed-by: Laine Stump <laine@redhat.com>
src/qemu/qemu_command.c

index 1a480c160aec7909071bac146e609ce4b792c695..7374b2beca2f488a6dfafc8044067856c6bb1ad7 100644 (file)
@@ -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;