No functional change

Signed-off-by: Laine Stump <la...@redhat.com>
---
 src/conf/domain_conf.c      | 20 ++++++++++----------
 src/conf/network_conf.c     |  2 +-
 src/conf/node_device_conf.c |  4 ++--
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index ade8c13914..cb69c97a8e 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1643,7 +1643,7 @@ virDomainBlkioDeviceParseXML(xmlNodePtr root,
         if (node->type != XML_ELEMENT_NODE)
             continue;
 
-        c = (char *)xmlNodeGetContent(node);
+        c = virXMLNodeContentString(node);
 
         if (virXMLNodeNameEqual(node, "path")) {
             /* To avoid the need for explicit cleanup on failure,
@@ -9373,10 +9373,10 @@ virDomainLeaseDefParseXML(xmlNodePtr node)
     while (cur != NULL) {
         if (cur->type == XML_ELEMENT_NODE) {
             if (!key && virXMLNodeNameEqual(cur, "key")) {
-                key = (char *)xmlNodeGetContent(cur);
+                key = virXMLNodeContentString(cur);
             } else if (!lockspace &&
                        virXMLNodeNameEqual(cur, "lockspace")) {
-                lockspace = (char *)xmlNodeGetContent(cur);
+                lockspace = virXMLNodeContentString(cur);
             } else if (!path &&
                        virXMLNodeNameEqual(cur, "target")) {
                 path = virXMLPropString(cur, "path");
@@ -10595,16 +10595,16 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
 
         } else if (!serial &&
                    virXMLNodeNameEqual(cur, "serial")) {
-            serial = (char *)xmlNodeGetContent(cur);
+            serial = virXMLNodeContentString(cur);
         } else if (!wwn &&
                    virXMLNodeNameEqual(cur, "wwn")) {
-            wwn = (char *)xmlNodeGetContent(cur);
+            wwn = virXMLNodeContentString(cur);
 
             if (!virValidateWWN(wwn))
                 goto error;
         } else if (!vendor &&
                    virXMLNodeNameEqual(cur, "vendor")) {
-            vendor = (char *)xmlNodeGetContent(cur);
+            vendor = virXMLNodeContentString(cur);
 
             if (strlen(vendor) > VENDOR_LEN) {
                 virReportError(VIR_ERR_XML_ERROR, "%s",
@@ -10619,7 +10619,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
             }
         } else if (!product &&
                    virXMLNodeNameEqual(cur, "product")) {
-            product = (char *)xmlNodeGetContent(cur);
+            product = virXMLNodeContentString(cur);
 
             if (strlen(product) > PRODUCT_LEN) {
                 virReportError(VIR_ERR_XML_ERROR, "%s",
@@ -13513,7 +13513,7 @@ virDomainSmartcardDefParseXML(virDomainXMLOptionPtr 
xmlopt,
                                      "exactly three certificates"));
                     goto error;
                 }
-                def->data.cert.file[i] = (char *)xmlNodeGetContent(cur);
+                def->data.cert.file[i] = virXMLNodeContentString(cur);
                 if (!def->data.cert.file[i]) {
                     virReportOOMError();
                     goto error;
@@ -13522,7 +13522,7 @@ virDomainSmartcardDefParseXML(virDomainXMLOptionPtr 
xmlopt,
             } else if (cur->type == XML_ELEMENT_NODE &&
                        virXMLNodeNameEqual(cur, "database") &&
                        !def->data.cert.database) {
-                def->data.cert.database = (char *)xmlNodeGetContent(cur);
+                def->data.cert.database = virXMLNodeContentString(cur);
                 if (!def->data.cert.database) {
                     virReportOOMError();
                     goto error;
@@ -19875,7 +19875,7 @@ virDomainLoaderDefParseXML(xmlNodePtr node,
     if (!fwAutoSelect) {
         readonly_str = virXMLPropString(node, "readonly");
         type_str = virXMLPropString(node, "type");
-        loader->path = (char *) xmlNodeGetContent(node);
+        loader->path = virXMLNodeContentString(node);
         if (STREQ_NULLABLE(loader->path, ""))
             VIR_FREE(loader->path);
     }
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 0fd68a7d66..0a32f57188 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -720,7 +720,7 @@ virNetworkDNSHostDefParseXML(const char *networkName,
         if (cur->type == XML_ELEMENT_NODE &&
             virXMLNodeNameEqual(cur, "hostname")) {
               if (cur->children != NULL) {
-                  g_autofree char *name = (char *) xmlNodeGetContent(cur);
+                  g_autofree char *name = virXMLNodeContentString(cur);
 
                   if (!name) {
                       virReportError(VIR_ERR_XML_DETAIL,
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index c54015336a..7bbe709c5d 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -1988,10 +1988,10 @@ virNodeDeviceDefParseXML(xmlXPathContextPtr ctxt,
 
         switch ((virNodeDevDevnodeType)val) {
         case VIR_NODE_DEV_DEVNODE_DEV:
-            def->devnode = (char*)xmlNodeGetContent(node);
+            def->devnode = virXMLNodeContentString(node);
             break;
         case VIR_NODE_DEV_DEVNODE_LINK:
-            def->devlinks[m++] = (char*)xmlNodeGetContent(node);
+            def->devlinks[m++] = virXMLNodeContentString(node);
             break;
         case VIR_NODE_DEV_DEVNODE_LAST:
             break;
-- 
2.25.4

Reply via email to