[libvirt] [PATCH 1/4] use g_ascii_strcasecmp instead of c_strcasecmp from gnulib

Pavel Hrdina phrdina at redhat.com
Wed Nov 20 14:54:18 UTC 2019


Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 src/internal.h      | 4 ++--
 tests/virhashtest.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/internal.h b/src/internal.h
index 0ff9f496ac..0780e2a2a3 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -75,9 +75,9 @@
 
 /* String equality tests, suggested by Jim Meyering. */
 #define STREQ(a, b) (strcmp(a, b) == 0)
-#define STRCASEEQ(a, b) (c_strcasecmp(a, b) == 0)
+#define STRCASEEQ(a, b) (g_ascii_strcasecmp(a, b) == 0)
 #define STRNEQ(a, b) (strcmp(a, b) != 0)
-#define STRCASENEQ(a, b) (c_strcasecmp(a, b) != 0)
+#define STRCASENEQ(a, b) (g_ascii_strcasecmp(a, b) != 0)
 #define STREQLEN(a, b, n) (strncmp(a, b, n) == 0)
 #define STRCASEEQLEN(a, b, n) (c_strncasecmp(a, b, n) == 0)
 #define STRNEQLEN(a, b, n) (strncmp(a, b, n) != 0)
diff --git a/tests/virhashtest.c b/tests/virhashtest.c
index 3132095463..66fa3a428e 100644
--- a/tests/virhashtest.c
+++ b/tests/virhashtest.c
@@ -446,7 +446,7 @@ testHashGetItems(const void *data G_GNUC_UNUSED)
 static int
 testHashEqualCompValue(const void *value1, const void *value2)
 {
-    return c_strcasecmp(value1, value2);
+    return g_ascii_strcasecmp(value1, value2);
 }
 
 static int
-- 
2.23.0




More information about the libvir-list mailing list