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