From nobody Thu Dec 18 08:30:57 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1574261410; cv=none; d=zoho.com; s=zohoarc; b=Lus0C7nAsCbJjWRxjde/KSqKpT91+vl+Wv+OfqKO+58Kxw7XJfkxhY4FFJzYJDLHf6RaVwWsVJtd2WcgpdWlhH3C8YloJeS2ZaXxh6nJ9T+Z28ZDY6p85nC6NaD8gpmEtBB24DsPHRGf8lLDrypcyhjQ/hNqdxuhWST2de7SQRI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1574261410; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=l3U6nDyoqxt4252KH3QWcPZ1FJNts0Pi5bIahlscl80=; b=GebpguRIT8N6D7YwYU0NETMIG8l8WsuFEwDgkMRIaYLaI1N2Lz1SZ5tbwGPExX/0EkosPfGwN42w+QKIxrAadCZo9SmiH5TrIyNg2sGJVp/yodn/n9Wnz2Oubn4h+FhGJTaEpohCkbVW/MPwzqEwZOrvH5/LqGCdkWokQcy5W4Y= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1574261410595635.0963078319196; Wed, 20 Nov 2019 06:50:10 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-418-LKHDX7d6PbCqKZ7Low1fOw-1; Wed, 20 Nov 2019 09:48:50 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 42365109D08B; Wed, 20 Nov 2019 14:48:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 08B972AA88; Wed, 20 Nov 2019 14:48:44 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AEF844E56D; Wed, 20 Nov 2019 14:48:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAKEme1o004838 for ; Wed, 20 Nov 2019 09:48:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4580D1037AD4; Wed, 20 Nov 2019 14:48:40 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.43.2.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id C465A1037AD2 for ; Wed, 20 Nov 2019 14:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574261409; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=l3U6nDyoqxt4252KH3QWcPZ1FJNts0Pi5bIahlscl80=; b=WzIfzhMm5WRHAswNEb0187oLThkJss/ZnTNHK7D5/lf7rTPSZ+tewRxZ9wRn/2GmeBwqeg 3YEuKn4VMOX+SINAyvNwMpfTTqwFU+bGKB3ESLa7BG0KvIZCI92dNrxiPsgDCS27ntThTp aQkpBV2bexW/rFrFUvYaWSpVYhea40c= From: Pavel Hrdina To: libvir-list@redhat.com Date: Wed, 20 Nov 2019 15:48:19 +0100 Message-Id: <238bc5f6566f0740555144c3ac0121a4e8ef15f0.1574261216.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 06/14] use g_ascii_isdigit instead of c_isdigit frum gnulib X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: LKHDX7d6PbCqKZ7Low1fOw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- src/interface/interface_backend_udev.c | 2 +- src/libxl/libxl_conf.c | 3 +-- src/storage/parthelper.c | 5 ++--- src/util/virbitmap.c | 5 ++--- src/util/virconf.c | 7 +++---- src/util/virfile.c | 4 +--- 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/interface/interface_backend_udev.c b/src/interface/interfa= ce_backend_udev.c index b7b06ed67a..29d91d3539 100644 --- a/src/interface/interface_backend_udev.c +++ b/src/interface/interface_backend_udev.c @@ -567,7 +567,7 @@ udevBridgeScanDirFilter(const struct dirent *entry) */ if (strlen(entry->d_name) >=3D 5) { if (STRPREFIX(entry->d_name, VIR_NET_GENERATED_TAP_PREFIX) && - c_isdigit(entry->d_name[4])) + g_ascii_isdigit(entry->d_name[4])) return 0; } =20 diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 6e4e6f5c90..1097b7a417 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -29,7 +29,6 @@ #include "internal.h" #include "virlog.h" #include "virerror.h" -#include "c-ctype.h" #include "datatypes.h" #include "virconf.h" #include "virfile.h" @@ -1860,7 +1859,7 @@ libxlDriverGetDom0MaxmemConf(libxlDriverConfigPtr cfg, char *p =3D mem_tokens[j] + 4; unsigned long long multiplier =3D 1; =20 - while (c_isdigit(*p)) + while (g_ascii_isdigit(*p)) p++; if (virStrToLong_ull(mem_tokens[j] + 4, &p, 10, maxmem) < = 0) break; diff --git a/src/storage/parthelper.c b/src/storage/parthelper.c index f1a8cc01ea..761a7f93fc 100644 --- a/src/storage/parthelper.c +++ b/src/storage/parthelper.c @@ -38,7 +38,6 @@ =20 #include "virutil.h" #include "virfile.h" -#include "c-ctype.h" #include "virstring.h" #include "virgettext.h" =20 @@ -87,7 +86,7 @@ int main(int argc, char **argv) * path, then append the "p" partition separator. Otherwise, if * the path ends with a letter already, then no need for a separat= or. */ - if (c_isdigit(path[strlen(path)-1]) || devmap_partsep) + if (g_ascii_isdigit(path[strlen(path)-1]) || devmap_partsep) partsep =3D "p"; else partsep =3D ""; @@ -97,7 +96,7 @@ int main(int argc, char **argv) return 2; =20 partsep =3D *canonical_path && - c_isdigit(canonical_path[strlen(canonical_path)-1]) ? "p" : ""; + g_ascii_isdigit(canonical_path[strlen(canonical_path)-1]) ? "p= " : ""; } =20 if ((dev =3D ped_device_get(path)) =3D=3D NULL) { diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 9bdb785025..15addee2e9 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -26,7 +26,6 @@ #include "virbitmap.h" #include "viralloc.h" #include "virbuffer.h" -#include "c-ctype.h" #include "virstring.h" #include "virutil.h" #include "virerror.h" @@ -506,7 +505,7 @@ virBitmapParseSeparator(const char *str, neg =3D true; } =20 - if (!c_isdigit(*cur)) + if (!g_ascii_isdigit(*cur)) goto error; =20 if (virStrToLong_i(cur, &tmp, 10, &start) < 0) @@ -642,7 +641,7 @@ virBitmapParseUnlimited(const char *str) neg =3D true; } =20 - if (!c_isdigit(*cur)) + if (!g_ascii_isdigit(*cur)) goto error; =20 if (virStrToLong_i(cur, &tmp, 10, &start) < 0) diff --git a/src/util/virconf.c b/src/util/virconf.c index a9a7148701..3b45436499 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -29,7 +29,6 @@ #include "virbuffer.h" #include "virconf.h" #include "virutil.h" -#include "c-ctype.h" #include "virlog.h" #include "viralloc.h" #include "virfile.h" @@ -350,11 +349,11 @@ virConfParseLong(virConfParserCtxtPtr ctxt, long long= *val) } else if (CUR =3D=3D '+') { NEXT; } - if ((ctxt->cur >=3D ctxt->end) || (!c_isdigit(CUR))) { + if ((ctxt->cur >=3D ctxt->end) || (!g_ascii_isdigit(CUR))) { virConfError(ctxt, VIR_ERR_CONF_SYNTAX, _("unterminated number")); return -1; } - while ((ctxt->cur < ctxt->end) && (c_isdigit(CUR))) { + while ((ctxt->cur < ctxt->end) && (g_ascii_isdigit(CUR))) { l =3D l * 10 + (CUR - '0'); NEXT; } @@ -514,7 +513,7 @@ virConfParseValue(virConfParserCtxtPtr ctxt) virConfFreeList(lst); return NULL; } - } else if (c_isdigit(CUR) || (CUR =3D=3D '-') || (CUR =3D=3D '+')) { + } else if (g_ascii_isdigit(CUR) || (CUR =3D=3D '-') || (CUR =3D=3D '+'= )) { if (ctxt->conf->flags & VIR_CONF_FLAG_VMX_FORMAT) { virConfError(ctxt, VIR_ERR_CONF_SYNTAX, _("numbers not allowed in VMX format")); diff --git a/src/util/virfile.c b/src/util/virfile.c index a329f2e83f..74e1339855 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -80,8 +80,6 @@ #include "virstring.h" #include "virutil.h" =20 -#include "c-ctype.h" - #define VIR_FROM_THIS VIR_FROM_NONE =20 VIR_LOG_INIT("util.file"); @@ -696,7 +694,7 @@ static int virFileLoopDeviceOpenSearch(char **dev_name) * new kernels have a dev named 'loop-control' */ if (!STRPREFIX(de->d_name, "loop") || - !c_isdigit(de->d_name[4])) + !g_ascii_isdigit(de->d_name[4])) continue; =20 looppath =3D g_strdup_printf("/dev/%s", de->d_name); --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list