Re: [PATCH v2 12/29] domain_conf.c: fix identation in virDomainControllerDefParseXML()

2022-02-21 Thread Ján Tomko

On a Tuesday in 2022, Daniel Henrique Barboza wrote:

The identation of VIR_DOMAIN_CONTROLLER_TYPE_PCI elements are in the
same level as the parent 'if (def->type == ...TYPE_PCI)' clause,
and the closing bracket of this 'if' looks like a misplaced bracket
of the 'targetIndex' clause that comes right before it.

Reviewed-by: Peter Krempa 
Signed-off-by: Daniel Henrique Barboza 
---
src/conf/domain_conf.c | 56 +-
1 file changed, 28 insertions(+), 28 deletions(-)



Reviewed-by: Ján Tomko 

Jano


signature.asc
Description: PGP signature


[PATCH v2 12/29] domain_conf.c: fix identation in virDomainControllerDefParseXML()

2022-01-25 Thread Daniel Henrique Barboza
The identation of VIR_DOMAIN_CONTROLLER_TYPE_PCI elements are in the
same level as the parent 'if (def->type == ...TYPE_PCI)' clause,
and the closing bracket of this 'if' looks like a misplaced bracket
of the 'targetIndex' clause that comes right before it.

Reviewed-by: Peter Krempa 
Signed-off-by: Daniel Henrique Barboza 
---
 src/conf/domain_conf.c | 56 +-
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 57ab5b19dd..72ee46026a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -9550,40 +9550,40 @@ virDomainControllerDefParseXML(virDomainXMLOption 
*xmlopt,
 ntargetNodes = virXPathNodeSet("./target", ctxt, );
 if (ntargetNodes == 1) {
 if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI) {
-if (virXMLPropInt(targetNodes[0], "chassisNr", 0, VIR_XML_PROP_NONE,
-  >opts.pciopts.chassisNr,
-  def->opts.pciopts.chassisNr) < 0)
-return NULL;
+if (virXMLPropInt(targetNodes[0], "chassisNr", 0, 
VIR_XML_PROP_NONE,
+  >opts.pciopts.chassisNr,
+  def->opts.pciopts.chassisNr) < 0)
+return NULL;
 
-if (virXMLPropInt(targetNodes[0], "chassis", 0, VIR_XML_PROP_NONE,
-  >opts.pciopts.chassis,
-  def->opts.pciopts.chassis) < 0)
-return NULL;
+if (virXMLPropInt(targetNodes[0], "chassis", 0, VIR_XML_PROP_NONE,
+  >opts.pciopts.chassis,
+  def->opts.pciopts.chassis) < 0)
+return NULL;
 
-if (virXMLPropInt(targetNodes[0], "port", 0, VIR_XML_PROP_NONE,
-  >opts.pciopts.port,
-  def->opts.pciopts.port) < 0)
-return NULL;
+if (virXMLPropInt(targetNodes[0], "port", 0, VIR_XML_PROP_NONE,
+  >opts.pciopts.port,
+  def->opts.pciopts.port) < 0)
+return NULL;
 
-if (virXMLPropInt(targetNodes[0], "busNr", 0, VIR_XML_PROP_NONE,
-  >opts.pciopts.busNr,
-  def->opts.pciopts.busNr) < 0)
-return NULL;
+if (virXMLPropInt(targetNodes[0], "busNr", 0, VIR_XML_PROP_NONE,
+  >opts.pciopts.busNr,
+  def->opts.pciopts.busNr) < 0)
+return NULL;
 
-if (virXMLPropTristateSwitch(targetNodes[0], "hotplug",
- VIR_XML_PROP_NONE,
- >opts.pciopts.hotplug) < 0)
-return NULL;
+if (virXMLPropTristateSwitch(targetNodes[0], "hotplug",
+ VIR_XML_PROP_NONE,
+ >opts.pciopts.hotplug) < 0)
+return NULL;
 
-if ((rc = virXMLPropInt(targetNodes[0], "index", 0, VIR_XML_PROP_NONE,
-  >opts.pciopts.targetIndex,
-  def->opts.pciopts.targetIndex)) < 0)
-return NULL;
+if ((rc = virXMLPropInt(targetNodes[0], "index", 0, 
VIR_XML_PROP_NONE,
+>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",
-- 
2.34.1