]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
use g_ascii_isalnum instead of c_isalnum from gnulib
authorPavel Hrdina <phrdina@redhat.com>
Mon, 18 Nov 2019 14:14:06 +0000 (15:14 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 10 Dec 2019 12:49:23 +0000 (13:49 +0100)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
src/node_device/node_device_udev.c
src/util/virconf.c
src/util/virkeyfile.c
tools/vsh.c

index fabd2ec45415d39f03e9449594ac5b52d88cbf5b..cae00dc9dc49e931756129bb86ed41e13c5d25bb 100644 (file)
@@ -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) = '_';
     }
 
index 42c847f9992e7c06055fa35865b4431d98b89fe5..b67716b9cee6250396647cb47ec03f2226410f09 100644 (file)
@@ -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) &&
index 7535c7cad21d8190566d2c1dcc6deb32776e444e..816bfae96de257c602e87f1ed62ccc562a9bbb5b 100644 (file)
@@ -21,7 +21,6 @@
 #include <config.h>
 
 
-#include "c-ctype.h"
 #include "virlog.h"
 #include "viralloc.h"
 #include "virfile.h"
@@ -155,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 '='");
@@ -224,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);
index 1076c8254b6ff2e9a2216b8774e3d339b063779c..beee1c2986316dcddd49b5d43aa1c30020bc09d4 100644 (file)
@@ -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;