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

virkeyfile: define IS_ASCII instead c_isascii from gnulib

GLib doesn't provide alternative to c_isascii and this is the only usage
of that macro so define a replacement ourselves.
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NCole Robinson <crobinso@redhat.com>
上级 243dbf54
......@@ -78,6 +78,7 @@ struct _virKeyFileParserCtxt {
#define IS_EOF (ctxt->cur >= ctxt->end)
#define IS_EOL(c) (((c) == '\n') || ((c) == '\r'))
#define IS_BLANK(c) (((c) == ' ') || ((c) == '\t'))
#define IS_ASCII(c) ((c) < 128)
#define CUR (*ctxt->cur)
#define NEXT if (!IS_EOF) ctxt->cur++;
......@@ -110,7 +111,7 @@ static int virKeyFileParseGroup(virKeyFileParserCtxtPtr ctxt)
VIR_FREE(ctxt->groupname);
name = ctxt->cur;
while (!IS_EOF && c_isascii(CUR) && CUR != ']')
while (!IS_EOF && IS_ASCII(CUR) && CUR != ']')
ctxt->cur++;
if (CUR != ']') {
virKeyFileError(ctxt, VIR_ERR_CONF_SYNTAX, "cannot find end of group name, expected ']'");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册