[PATCH 1/2] util: xml: Fix declararation of 'const char *' parameters in virXMLProp* helpers

Peter Krempa pkrempa at redhat.com
Mon Oct 3 13:45:12 UTC 2022


We commonly use 'const char *name' instead of 'const char* name'.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/util/virxml.c | 20 ++++++++++----------
 src/util/virxml.h | 12 ++++++------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/util/virxml.c b/src/util/virxml.c
index a53a52dcf8..c43cc0fd5d 100644
--- a/src/util/virxml.c
+++ b/src/util/virxml.c
@@ -517,8 +517,8 @@ virXMLNodeContentString(xmlNodePtr node)

 static int
 virXMLPropEnumInternal(xmlNodePtr node,
-                       const char* name,
-                       int (*strToInt)(const char*),
+                       const char *name,
+                       int (*strToInt)(const char *),
                        virXMLPropFlags flags,
                        unsigned int *result,
                        unsigned int defaultResult)
@@ -570,7 +570,7 @@ virXMLPropEnumInternal(xmlNodePtr node,
  */
 int
 virXMLPropTristateBool(xmlNodePtr node,
-                       const char* name,
+                       const char *name,
                        virXMLPropFlags flags,
                        virTristateBool *result)
 {
@@ -590,7 +590,7 @@ virXMLPropTristateBool(xmlNodePtr node,
  * being omitted entirely */
 int
 virXMLPropTristateBoolAllowDefault(xmlNodePtr node,
-                                   const char* name,
+                                   const char *name,
                                    virXMLPropFlags flags,
                                    virTristateBool *result)
 {
@@ -616,7 +616,7 @@ virXMLPropTristateBoolAllowDefault(xmlNodePtr node,
  */
 int
 virXMLPropTristateSwitch(xmlNodePtr node,
-                         const char* name,
+                         const char *name,
                          virXMLPropFlags flags,
                          virTristateSwitch *result)
 {
@@ -708,7 +708,7 @@ virXMLPropInt(xmlNodePtr node,
  */
 int
 virXMLPropUInt(xmlNodePtr node,
-               const char* name,
+               const char *name,
                int base,
                virXMLPropFlags flags,
                unsigned int *result)
@@ -831,7 +831,7 @@ virXMLPropLongLong(xmlNodePtr node,
  */
 int
 virXMLPropULongLong(xmlNodePtr node,
-                    const char* name,
+                    const char *name,
                     int base,
                     virXMLPropFlags flags,
                     unsigned long long *result)
@@ -891,7 +891,7 @@ virXMLPropULongLong(xmlNodePtr node,
  */
 int
 virXMLPropEnumDefault(xmlNodePtr node,
-                      const char* name,
+                      const char *name,
                       int (*strToInt)(const char*),
                       virXMLPropFlags flags,
                       unsigned int *result,
@@ -916,7 +916,7 @@ virXMLPropEnumDefault(xmlNodePtr node,
  */
 int
 virXMLPropUUID(xmlNodePtr node,
-               const char* name,
+               const char *name,
                virXMLPropFlags flags,
                unsigned char *result)
 {
@@ -963,7 +963,7 @@ virXMLPropUUID(xmlNodePtr node,
  */
 int
 virXMLPropEnum(xmlNodePtr node,
-               const char* name,
+               const char *name,
                int (*strToInt)(const char*),
                virXMLPropFlags flags,
                unsigned int *result)
diff --git a/src/util/virxml.h b/src/util/virxml.h
index af58d44835..65db46ca98 100644
--- a/src/util/virxml.h
+++ b/src/util/virxml.h
@@ -135,7 +135,7 @@ virXMLPropInt(xmlNodePtr node,

 int
 virXMLPropUInt(xmlNodePtr node,
-               const char* name,
+               const char *name,
                int base,
                virXMLPropFlags flags,
                unsigned int *result)
@@ -152,7 +152,7 @@ virXMLPropLongLong(xmlNodePtr node,

 int
 virXMLPropULongLong(xmlNodePtr node,
-                    const char* name,
+                    const char *name,
                     int base,
                     virXMLPropFlags flags,
                     unsigned long long *result)
@@ -160,8 +160,8 @@ virXMLPropULongLong(xmlNodePtr node,

 int
 virXMLPropEnum(xmlNodePtr node,
-               const char* name,
-               int (*strToInt)(const char*),
+               const char *name,
+               int (*strToInt)(const char *),
                virXMLPropFlags flags,
                unsigned int *result)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
@@ -176,8 +176,8 @@ virXMLPropUUID(xmlNodePtr node,

 int
 virXMLPropEnumDefault(xmlNodePtr node,
-                      const char* name,
-                      int (*strToInt)(const char*),
+                      const char *name,
+                      int (*strToInt)(const char *),
                       virXMLPropFlags flags,
                       unsigned int *result,
                       unsigned int defaultResult)
-- 
2.37.3



More information about the libvir-list mailing list