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

use g_ascii_isalpha instead of c_isalpha from gnulib

Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NCole Robinson <crobinso@redhat.com>
上级 c275ea93
......@@ -37,7 +37,6 @@
#include "virxml.h"
#include "viruuid.h"
#include "virbuffer.h"
#include "c-ctype.h"
#include "virfile.h"
#include "virstring.h"
......@@ -482,7 +481,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName,
}
name = virXMLPropString(node, "name");
if (name && (!c_isalpha(name[0]))) {
if (name && (!g_ascii_isalpha(name[0]))) {
virReportError(VIR_ERR_XML_ERROR,
_("Cannot use host name '%s' in network '%s'"),
name, networkName);
......
......@@ -40,7 +40,6 @@
#include "viralloc.h"
#include "virlog.h"
#include "virerror.h"
#include "c-ctype.h"
#include "cpu/cpu.h"
#include "viruuid.h"
#include "virfile.h"
......@@ -3934,7 +3933,7 @@ qemuDomainDefNamespaceParseCommandlineArgs(qemuDomainXmlNsDefPtr nsdef,
static int
qemuDomainDefNamespaceParseCommandlineEnvNameValidate(const char *envname)
{
if (!c_isalpha(envname[0]) && envname[0] != '_') {
if (!g_ascii_isalpha(envname[0]) && envname[0] != '_') {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Invalid environment name, it must begin with a letter or underscore"));
return -1;
......
......@@ -25,8 +25,6 @@
#include "virerror.h"
#include "virlog.h"
#include "c-ctype.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
VIR_LOG_INIT("qemu.qemu_qapi");
......@@ -165,7 +163,7 @@ virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur,
const char *query = virQEMUQAPISchemaTraverseContextNextQuery(ctxt);
char modifier = *query;
if (!c_isalpha(modifier))
if (!g_ascii_isalpha(modifier))
query++;
/* exit on modifers for other types */
......@@ -218,7 +216,7 @@ virQEMUQAPISchemaTraverseCommand(virJSONValuePtr cur,
const char *querytype;
char modifier = *query;
if (!c_isalpha(modifier))
if (!g_ascii_isalpha(modifier))
query++;
/* exit on modifers for other types */
......
......@@ -556,7 +556,7 @@ virConfParseName(virConfParserCtxtPtr ctxt)
SKIP_BLANKS;
base = ctxt->cur;
/* TODO: probably need encoding support and UTF-8 parsing ! */
if (!c_isalpha(CUR) &&
if (!g_ascii_isalpha(CUR) &&
!((ctxt->conf->flags & VIR_CONF_FLAG_VMX_FORMAT) && (CUR == '.'))) {
virConfError(ctxt, VIR_ERR_CONF_SYNTAX, _("expecting a name"));
return NULL;
......
......@@ -3190,7 +3190,7 @@ virFileIsAbsPath(const char *path)
return true;
#ifdef WIN32
if (c_isalpha(path[0]) &&
if (g_ascii_isalpha(path[0]) &&
path[1] == ':' &&
VIR_FILE_IS_DIR_SEPARATOR(path[2]))
return true;
......@@ -3242,7 +3242,7 @@ virFileSkipRoot(const char *path)
#ifdef WIN32
/* Skip X:\ */
if (c_isalpha(path[0]) &&
if (g_ascii_isalpha(path[0]) &&
path[1] == ':' &&
VIR_FILE_IS_DIR_SEPARATOR(path[2]))
return path + 3;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册