[PATCH 09/13] use g_ascii_isxdigit instead of c_isxdigit from gnulib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/util/virmacaddr.c | 6 +++---
 src/util/virutil.c    | 2 +-
 src/util/viruuid.c    | 5 ++---
 src/vmx/vmx.c         | 2 +-
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/util/virmacaddr.c b/src/util/virmacaddr.c
index 3eb6407c45..a6893faf9a 100644
--- a/src/util/virmacaddr.c
+++ b/src/util/virmacaddr.c
@@ -38,9 +38,9 @@ virMacAddrCompare(const char *p, const char *q)
 {
     unsigned char c, d;
     do {
-        while (*p == '0' && c_isxdigit(p[1]))
+        while (*p == '0' && g_ascii_isxdigit(p[1]))
             ++p;
-        while (*q == '0' && c_isxdigit(q[1]))
+        while (*q == '0' && g_ascii_isxdigit(q[1]))
             ++q;
         c = c_tolower(*p);
         d = c_tolower(*q);
@@ -153,7 +153,7 @@ virMacAddrParse(const char* str, virMacAddrPtr addr)
         /* This is solely to avoid accepting the leading
          * space or "+" that strtoul would otherwise accept.
          */
-        if (!c_isxdigit(*str))
+        if (!g_ascii_isxdigit(*str))
             break;
 
         result = strtoul(str, &end_ptr, 16); /* exempt from syntax-check */
diff --git a/src/util/virutil.c b/src/util/virutil.c
index f3cf494353..12f44796c8 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -1525,7 +1525,7 @@ virValidateWWN(const char *wwn)
         p += 2;
 
     for (i = 0; p[i]; i++) {
-        if (!c_isxdigit(p[i]))
+        if (!g_ascii_isxdigit(p[i]))
             break;
     }
 
diff --git a/src/util/viruuid.c b/src/util/viruuid.c
index 835c873300..0745189aa9 100644
--- a/src/util/viruuid.c
+++ b/src/util/viruuid.c
@@ -28,7 +28,6 @@
 #include <time.h>
 #include <unistd.h>
 
-#include "c-ctype.h"
 #include "internal.h"
 #include "virutil.h"
 #include "virerror.h"
@@ -113,14 +112,14 @@ virUUIDParse(const char *uuidstr, unsigned char *uuid)
             cur++;
             continue;
         }
-        if (!c_isxdigit(*cur))
+        if (!g_ascii_isxdigit(*cur))
             goto error;
         uuid[i] = virHexToBin(*cur);
         uuid[i] *= 16;
         cur++;
         if (*cur == 0)
             goto error;
-        if (!c_isxdigit(*cur))
+        if (!g_ascii_isxdigit(*cur))
             goto error;
         uuid[i] += virHexToBin(*cur);
         i++;
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 0ccc4eefe6..20dc974928 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -666,7 +666,7 @@ virVMXUnescapeHex(char *string, char escape)
     /* Unescape from 'cXX' where c is the escape char and X is a hex digit */
     while (*tmp1 != '\0') {
         if (*tmp1 == escape) {
-            if (!c_isxdigit(tmp1[1]) || !c_isxdigit(tmp1[2]))
+            if (!g_ascii_isxdigit(tmp1[1]) || !g_ascii_isxdigit(tmp1[2]))
                 return -1;
 
             *tmp2++ = virHexToBin(tmp1[1]) * 16 + virHexToBin(tmp1[2]);
-- 
2.23.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux