]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virDomainControllerDefParseXML: Fix broken code indentation when parsing PCI contolle...
authorPeter Krempa <pkrempa@redhat.com>
Fri, 26 Aug 2022 11:38:45 +0000 (13:38 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 1 Sep 2022 11:11:10 +0000 (13:11 +0200)
Code was not indented properly for one of the nested conditions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c

index c5970dde9ce040e5cc18db38f1e423c8361eb36f..14fad39078a95378642588c710bb0ea53a5a8e59 100644 (file)
@@ -8208,40 +8208,40 @@ virDomainControllerDefParseXML(virDomainXMLOption *xmlopt,
     ntargetNodes = virXPathNodeSet("./target", ctxt, &targetNodes);
     if (ntargetNodes == 1) {
         if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI) {
-        if (virXMLPropInt(targetNodes[0], "chassisNr", 0, VIR_XML_PROP_NONE,
-                      &def->opts.pciopts.chassisNr,
-                      def->opts.pciopts.chassisNr) < 0)
-            return NULL;
+            if (virXMLPropInt(targetNodes[0], "chassisNr", 0, VIR_XML_PROP_NONE,
+                              &def->opts.pciopts.chassisNr,
+                              def->opts.pciopts.chassisNr) < 0)
+                return NULL;
 
-        if (virXMLPropInt(targetNodes[0], "chassis", 0, VIR_XML_PROP_NONE,
-                          &def->opts.pciopts.chassis,
-                          def->opts.pciopts.chassis) < 0)
-            return NULL;
+            if (virXMLPropInt(targetNodes[0], "chassis", 0, VIR_XML_PROP_NONE,
+                              &def->opts.pciopts.chassis,
+                              def->opts.pciopts.chassis) < 0)
+                return NULL;
 
-        if (virXMLPropInt(targetNodes[0], "port", 0, VIR_XML_PROP_NONE,
-                          &def->opts.pciopts.port,
-                          def->opts.pciopts.port) < 0)
-            return NULL;
+            if (virXMLPropInt(targetNodes[0], "port", 0, VIR_XML_PROP_NONE,
+                              &def->opts.pciopts.port,
+                              def->opts.pciopts.port) < 0)
+                return NULL;
 
-        if (virXMLPropInt(targetNodes[0], "busNr", 0, VIR_XML_PROP_NONE,
-                          &def->opts.pciopts.busNr,
-                          def->opts.pciopts.busNr) < 0)
-            return NULL;
+            if (virXMLPropInt(targetNodes[0], "busNr", 0, VIR_XML_PROP_NONE,
+                              &def->opts.pciopts.busNr,
+                              def->opts.pciopts.busNr) < 0)
+                return NULL;
 
-        if (virXMLPropTristateSwitch(targetNodes[0], "hotplug",
-                                     VIR_XML_PROP_NONE,
-                                     &def->opts.pciopts.hotplug) < 0)
-            return NULL;
+            if (virXMLPropTristateSwitch(targetNodes[0], "hotplug",
+                                         VIR_XML_PROP_NONE,
+                                         &def->opts.pciopts.hotplug) < 0)
+                return NULL;
 
-        if ((rc = virXMLPropInt(targetNodes[0], "index", 0, VIR_XML_PROP_NONE,
-                          &def->opts.pciopts.targetIndex,
-                          def->opts.pciopts.targetIndex)) < 0)
-            return NULL;
+            if ((rc = virXMLPropInt(targetNodes[0], "index", 0, VIR_XML_PROP_NONE,
+                                    &def->opts.pciopts.targetIndex,
+                                    def->opts.pciopts.targetIndex)) < 0)
+                return NULL;
 
-        if ((rc == 1) && def->opts.pciopts.targetIndex == -1)
-            virReportError(VIR_ERR_XML_ERROR,
-                           _("Invalid target index '%i' in PCI controller"),
-                           def->opts.pciopts.targetIndex);
+            if ((rc == 1) && def->opts.pciopts.targetIndex == -1)
+                virReportError(VIR_ERR_XML_ERROR,
+                               _("Invalid target index '%i' in PCI controller"),
+                               def->opts.pciopts.targetIndex);
         }
     } else if (ntargetNodes > 1) {
         virReportError(VIR_ERR_XML_ERROR, "%s",