[PATCH 03/13] use g_ascii_isalpha instead of c_isalpha from gnulib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/conf/network_conf.c | 3 +--
 src/qemu/qemu_domain.c  | 3 +--
 src/qemu/qemu_qapi.c    | 4 +---
 src/util/virconf.c      | 2 +-
 src/util/virfile.c      | 4 ++--
 5 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 6970831593..5551b5b4d5 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -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);
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index f54b9b21ff..5eea0ebcd7 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -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"
@@ -3768,7 +3767,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;
diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c
index 484f274c63..15a85fd1ad 100644
--- a/src/qemu/qemu_qapi.c
+++ b/src/qemu/qemu_qapi.c
@@ -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 */
diff --git a/src/util/virconf.c b/src/util/virconf.c
index 305a78b515..cde747158c 100644
--- a/src/util/virconf.c
+++ b/src/util/virconf.c
@@ -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;
diff --git a/src/util/virfile.c b/src/util/virfile.c
index fca7ff9d35..a329f2e83f 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -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;
-- 
2.23.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux