From nobody Mon Feb 9 00:56:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554295505074726.0532901619696; Wed, 3 Apr 2019 05:45:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B7872308426A; Wed, 3 Apr 2019 12:45:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 54A0618522; Wed, 3 Apr 2019 12:45:02 +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 DB3041803389; Wed, 3 Apr 2019 12:45:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x33Cj1hR010718 for ; Wed, 3 Apr 2019 08:45:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 48D6C5C237; Wed, 3 Apr 2019 12:45:01 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id C52055C883 for ; Wed, 3 Apr 2019 12:45:00 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 3 Apr 2019 14:44:54 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/5] util: Remove virParseNumber 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 03 Apr 2019 12:45:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" We have more modern replacements. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/libvirt_private.syms | 1 - src/util/virutil.c | 31 ------------------------------- src/util/virutil.h | 1 - 3 files changed, 33 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index d61c772d1a..72a378f21a 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3222,7 +3222,6 @@ virIsSUID; virMemoryLimitIsSet; virMemoryLimitTruncate; virMemoryMaxValue; -virParseNumber; virParseOwnershipIds; virParseVersionString; virScaleInteger; diff --git a/src/util/virutil.c b/src/util/virutil.c index c0acf59831..3f214629ac 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -278,37 +278,6 @@ virScaleInteger(unsigned long long *value, const char = *suffix, } -/** - * virParseNumber: - * @str: pointer to the char pointer used - * - * Parse an unsigned number - * - * Returns the unsigned number or -1 in case of error. @str will be - * updated to skip the number. - */ -int -virParseNumber(const char **str) -{ - int ret =3D 0; - const char *cur =3D *str; - - if ((*cur < '0') || (*cur > '9')) - return -1; - - while (c_isdigit(*cur)) { - unsigned int c =3D *cur - '0'; - - if ((ret > INT_MAX / 10) || - ((ret =3D=3D INT_MAX / 10) && (c > INT_MAX % 10))) - return -1; - ret =3D ret * 10 + c; - cur++; - } - *str =3D cur; - return ret; -} - /** * virParseVersionString: * @str: const char pointer to the version string diff --git a/src/util/virutil.h b/src/util/virutil.h index a80e28b670..e537cc36cb 100644 --- a/src/util/virutil.h +++ b/src/util/virutil.h @@ -54,7 +54,6 @@ int virScaleInteger(unsigned long long *value, const char= *suffix, int virHexToBin(unsigned char c); -int virParseNumber(const char **str); int virParseVersionString(const char *str, unsigned long *version, bool allowMissing); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list