1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-24 06:03:52 +03:00

use g_ascii_isalnum instead of c_isalnum from gnulib

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Pavel Hrdina 2019-11-18 15:14:06 +01:00
parent d07cb0bcd3
commit c275ea93db
4 changed files with 5 additions and 7 deletions

View 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) = '_';
}

View 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) &&

View 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);

View 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;