[PATCH 03/11] conf: domain: Reformat XPath queries in virSysinfoSystemParseXML

Peter Krempa pkrempa at redhat.com
Tue Nov 1 15:02:17 UTC 2022


Remove the unneeded linebreaks after assignment operator. Only one line
exceeds 80 colums and just by 4 characters.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/conf/domain_conf.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index eab2e98792..b0a978cc62 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -12198,14 +12198,10 @@ virSysinfoSystemParseXML(xmlNodePtr node,

     def = g_new0(virSysinfoSystemDef, 1);

-    def->manufacturer =
-        virXPathString("string(entry[@name='manufacturer'])", ctxt);
-    def->product =
-        virXPathString("string(entry[@name='product'])", ctxt);
-    def->version =
-        virXPathString("string(entry[@name='version'])", ctxt);
-    def->serial =
-        virXPathString("string(entry[@name='serial'])", ctxt);
+    def->manufacturer = virXPathString("string(entry[@name='manufacturer'])", ctxt);
+    def->product = virXPathString("string(entry[@name='product'])", ctxt);
+    def->version = virXPathString("string(entry[@name='version'])", ctxt);
+    def->serial = virXPathString("string(entry[@name='serial'])", ctxt);
     tmpUUID = virXPathString("string(entry[@name='uuid'])", ctxt);
     if (tmpUUID) {
         unsigned char uuidbuf[VIR_UUID_BUFLEN];
@@ -12232,10 +12228,8 @@ virSysinfoSystemParseXML(xmlNodePtr node,
         virUUIDFormat(uuidbuf, uuidstr);
         def->uuid = g_strdup(uuidstr);
     }
-    def->sku =
-        virXPathString("string(entry[@name='sku'])", ctxt);
-    def->family =
-        virXPathString("string(entry[@name='family'])", ctxt);
+    def->sku = virXPathString("string(entry[@name='sku'])", ctxt);
+    def->family = virXPathString("string(entry[@name='family'])", ctxt);

     if (!def->manufacturer && !def->product && !def->version &&
         !def->serial && !def->uuid && !def->sku && !def->family) {
-- 
2.37.3



More information about the libvir-list mailing list