]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: xml: Use consistent naming for RNG validation error handling functions
authorPeter Krempa <pkrempa@redhat.com>
Tue, 4 Oct 2022 14:09:20 +0000 (16:09 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 1 Nov 2022 12:07:20 +0000 (13:07 +0100)
Rename 'catchRNGError' to 'virXMLValidatorRNGErrorCatch' and
'ignoreRNGError' to 'virXMLValidatorRNGErrorIgnore'.

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

index 43b1ccfd2406c8ee5225233b1242d7b88c615b96..16e7ef9808ad858ca5ccc5521125bdd57f544eb5 100644 (file)
@@ -1608,9 +1608,9 @@ virXMLNodeSanitizeNamespaces(xmlNodePtr node)
 
 
 static void
-catchRNGError(void *ctx,
-              const char *msg,
-              ...)
+virXMLValidatorRNGErrorCatch(void *ctx,
+                             const char *msg,
+                             ...)
 {
     virBuffer *buf = ctx;
     va_list args;
@@ -1624,9 +1624,9 @@ catchRNGError(void *ctx,
 
 
 static void
-ignoreRNGError(void *ctx G_GNUC_UNUSED,
-               const char *msg G_GNUC_UNUSED,
-               ...)
+virXMLValidatorRNGErrorIgnore(void *ctx G_GNUC_UNUSED,
+                              const char *msg G_GNUC_UNUSED,
+                              ...)
 {}
 
 
@@ -1648,8 +1648,8 @@ virXMLValidatorInit(const char *schemafile)
     }
 
     xmlRelaxNGSetParserErrors(validator->rngParser,
-                              catchRNGError,
-                              ignoreRNGError,
+                              virXMLValidatorRNGErrorCatch,
+                              virXMLValidatorRNGErrorIgnore,
                               &validator->buf);
 
     if (!(validator->rng = xmlRelaxNGParse(validator->rngParser))) {
@@ -1668,8 +1668,8 @@ virXMLValidatorInit(const char *schemafile)
     }
 
     xmlRelaxNGSetValidErrors(validator->rngValid,
-                             catchRNGError,
-                             ignoreRNGError,
+                             virXMLValidatorRNGErrorCatch,
+                             virXMLValidatorRNGErrorIgnore,
                              &validator->buf);
     return validator;