提交 c275ea93 编写于 作者: P Pavel Hrdina

use g_ascii_isalnum instead of c_isalnum from gnulib

Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NCole Robinson <crobinso@redhat.com>
上级 d07cb0bc
......@@ -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) = '_';
}
......
......@@ -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) &&
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册