[PATCH v2 03/14] use g_ascii_isalnum instead of c_isalnum from gnulib

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/node_device/node_device_udev.c | 3 +--
 src/util/virconf.c                 | 2 +-
 src/util/virkeyfile.c              | 4 ++--
 tools/vsh.c                        | 2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index fabd2ec454..cae00dc9dc 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -22,7 +22,6 @@
 #include <libudev.h>
 #include <pciaccess.h>
 #include <scsi/scsi.h>
-#include <c-ctype.h>
 
 #include "dirname.h"
 #include "node_device_conf.h"
@@ -307,7 +306,7 @@ udevGenerateDeviceName(struct udev_device *device,
     def->name = virBufferContentAndReset(&buf);
 
     for (i = 0; i < strlen(def->name); i++) {
-        if (!(c_isalnum(*(def->name + i))))
+        if (!(g_ascii_isalnum(*(def->name + i))))
             *(def->name + i) = '_';
     }
 
diff --git a/src/util/virconf.c b/src/util/virconf.c
index 42c847f999..b67716b9ce 100644
--- a/src/util/virconf.c
+++ b/src/util/virconf.c
@@ -562,7 +562,7 @@ virConfParseName(virConfParserCtxtPtr ctxt)
         return NULL;
     }
     while ((ctxt->cur < ctxt->end) &&
-           (c_isalnum(CUR) || (CUR == '_') ||
+           (g_ascii_isalnum(CUR) || (CUR == '_') ||
             ((ctxt->conf->flags & VIR_CONF_FLAG_VMX_FORMAT) &&
              ((CUR == ':') || (CUR == '.') || (CUR == '-'))) ||
             ((ctxt->conf->flags & VIR_CONF_FLAG_LXC_FORMAT) &&
diff --git a/src/util/virkeyfile.c b/src/util/virkeyfile.c
index 054a187ba2..e50a37d3a7 100644
--- a/src/util/virkeyfile.c
+++ b/src/util/virkeyfile.c
@@ -154,7 +154,7 @@ static int virKeyFileParseValue(virKeyFileParserCtxtPtr ctxt)
     }
 
     keystart = ctxt->cur;
-    while (!IS_EOF && c_isalnum(CUR) && CUR != '=')
+    while (!IS_EOF && g_ascii_isalnum(CUR) && CUR != '=')
         ctxt->cur++;
     if (CUR != '=') {
         virKeyFileError(ctxt, VIR_ERR_CONF_SYNTAX, "expected end of value name, expected '='");
@@ -223,7 +223,7 @@ static int virKeyFileParseStatement(virKeyFileParserCtxtPtr ctxt)
 
     if (CUR == '[') {
         ret = virKeyFileParseGroup(ctxt);
-    } else if (c_isalnum(CUR)) {
+    } else if (g_ascii_isalnum(CUR)) {
         ret = virKeyFileParseValue(ctxt);
     } else if (CUR == '#' || CUR == ';') {
         ret = virKeyFileParseComment(ctxt);
diff --git a/tools/vsh.c b/tools/vsh.c
index 1076c8254b..beee1c2986 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -1444,7 +1444,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser, vshCmd **partial)
             } else if (data_only) {
                 goto get_data;
             } else if (tkdata[0] == '-' && tkdata[1] == '-' &&
-                       c_isalnum(tkdata[2])) {
+                       g_ascii_isalnum(tkdata[2])) {
                 char *optstr = strchr(tkdata + 2, '=');
                 size_t opt_index = 0;
 
-- 
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