From nobody Thu May 2 14:10:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.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=1582489278; cv=none; d=zohomail.com; s=zohoarc; b=RNiYAq+fEo2mw0fSACG8zoR3pLQRYNNHbFlSLpaQRqcEikaJ5SQTrzKqGodPqf/CslGXV08Hcbyqc1wpfqe/Mmh+I5JTlM18DcxyqfKUH1j0Gnl2+tZGtUZtNs8Kc4EKJoS3pEs4O0WLwezwXsHoDj5XlzFiUEJu5rKKzB2bf6U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582489278; 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=Sdak3mVGDTqZ6IeFEtYLCNxLsOjWrtCfpbZtZEX9Ni0=; b=E9u7Ruurdb+NK8DiiTKa/JMxVJh3yzUha/fbPfD8brlxZ3XXpFg2VlJLXgeKtagiJapMO+lxeHTqltE5B2agWJTTq48E8T9GQd3vcIAh9Mej2IRJ1w3d83T2YBOISowEJB44yWftzZ5ZvZNLMB8S21vQdDaqeStxU+FMU92rp8Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.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 [207.211.31.120]) by mx.zohomail.com with SMTPS id 1582489277974813.8154475916973; Sun, 23 Feb 2020 12:21:17 -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-337-F7GMHl4NMbqCrOA7u-d6hQ-1; Sun, 23 Feb 2020 15:21:14 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1F5408017DF; Sun, 23 Feb 2020 20:21:08 +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 B259360BF3; Sun, 23 Feb 2020 20:21:07 +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 16442860C5; Sun, 23 Feb 2020 20:21:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01NKL0qO023719 for ; Sun, 23 Feb 2020 15:21:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6844991833; Sun, 23 Feb 2020 20:21:00 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-20.brq.redhat.com [10.40.200.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5E485C105 for ; Sun, 23 Feb 2020 20:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582489276; 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=Sdak3mVGDTqZ6IeFEtYLCNxLsOjWrtCfpbZtZEX9Ni0=; b=M2TbCOrqrH7DzvRVQrkyL2POCL+CnPR2ozp8C2QVwo7s+hZYFSiMPck93SoFyjsvgcodRV JO99Hrq7bPyJhf1wQWrxS63LNx782/l2M8bDDk4zNa+gHwG7rZVWRJch3Mq5pxDIhqkY9c JLl8zqho5ACMH9dLwKA8gMZ0B1Dh6bo= X-MC-Unique: F7GMHl4NMbqCrOA7u-d6hQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/3] util: uuid: remove use of virHexToBin Date: Sun, 23 Feb 2020 21:20:52 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Prefer g_ascii_xdigit_value to virHexToBin. Check the return value of the function and remove the g_ascii_isxdigit calls, since they're done anyway internally. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Laine Stump --- src/util/viruuid.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/util/viruuid.c b/src/util/viruuid.c index c8ee59beee..908b09945d 100644 --- a/src/util/viruuid.c +++ b/src/util/viruuid.c @@ -29,7 +29,6 @@ #include =20 #include "internal.h" -#include "virutil.h" #include "virerror.h" #include "virlog.h" #include "viralloc.h" @@ -105,6 +104,7 @@ virUUIDParse(const char *uuidstr, unsigned char *uuid) cur++; =20 for (i =3D 0; i < VIR_UUID_BUFLEN;) { + int val; uuid[i] =3D 0; if (*cur =3D=3D 0) return -1; @@ -112,16 +112,15 @@ virUUIDParse(const char *uuidstr, unsigned char *uuid) cur++; continue; } - if (!g_ascii_isxdigit(*cur)) + if ((val =3D g_ascii_xdigit_value(*cur)) < 0) return -1; - uuid[i] =3D virHexToBin(*cur); - uuid[i] *=3D 16; + uuid[i] =3D 16 * val; cur++; if (*cur =3D=3D 0) return -1; - if (!g_ascii_isxdigit(*cur)) + if ((val =3D g_ascii_xdigit_value(*cur)) < 0) return -1; - uuid[i] +=3D virHexToBin(*cur); + uuid[i] +=3D val; i++; cur++; } --=20 2.24.1 From nobody Thu May 2 14:10:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1582489278; cv=none; d=zohomail.com; s=zohoarc; b=ByNaZsfjD/i74v2DLAqzELVYM0LgbYByEqCMc6b2hOQo0FB1YjA7G+Z99ugE912WhoHboL/GE0jAZiErk8h7IPkioIqOTiZSjq/fwO2+bFi9ZmK4mcOV+roXaLH0hA3EEDPXIvY78F3L4r5oXtbNjMOmhgwkKvVk4L4eTsmt5aU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582489278; 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=uK9jUVz7vhz+eEO4nvqttzZVwjcOyZr/ZGuyfKm0PS4=; b=hBdhMwLIzRZCmlBoV6kOohYikI3sGnScb9mfdtqXsJxQKAGNa1EYp0m0K62kJb97Vg45QFK4JZ2q0vZju+8mpIpNVAu74TfOGQL5MWWCZbxS8K5LusQ9/vSitJ6byLyFYv4OSVHPsOUcHeILYyMpvznJTviD87T1WyFz4D2ZjtE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 158248927797499.29557340661029; Sun, 23 Feb 2020 12:21:17 -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-27-jxy3dr9qM0eJ4J1ywNi1dw-1; Sun, 23 Feb 2020 15:21:13 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 13DDC8017CC; Sun, 23 Feb 2020 20:21:08 +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 B18341001B2D; Sun, 23 Feb 2020 20:21:07 +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 DE97918089C8; Sun, 23 Feb 2020 20:21:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01NKL1lq023729 for ; Sun, 23 Feb 2020 15:21:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id A7F8291833; Sun, 23 Feb 2020 20:21:01 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-20.brq.redhat.com [10.40.200.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id D287C5C105 for ; Sun, 23 Feb 2020 20:21:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582489276; 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=uK9jUVz7vhz+eEO4nvqttzZVwjcOyZr/ZGuyfKm0PS4=; b=TXEZk8Z5U9xYGvke391g9mGLZlrkSATGINx8/u0Hn28dB2VwBXmIpVn5bmlR/QGscIcePh mNVObwy5IWSmiYR4Om8oe9iH3M0r0o+vNOGh2HmePv5aXXSgfAOu/UzTC7+pr846+CtffF LGLUhv0/POXixbiWSSoGfqLCUMv822w= X-MC-Unique: jxy3dr9qM0eJ4J1ywNi1dw-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/3] Remove all use of virHexToBin Date: Sun, 23 Feb 2020 21:20:53 +0100 Message-Id: <4f27b6d1554a259dd096e17ea7a248cc6e3b74a7.1582489237.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Replace it by g_ascii_xdigit_value. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Laine Stump --- src/util/virbitmap.c | 3 +-- src/util/virmacaddr.c | 5 ++--- src/vmx/vmx.c | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 0679915f70..baf77fe556 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -27,7 +27,6 @@ #include "viralloc.h" #include "virbuffer.h" #include "virstring.h" -#include "virutil.h" #include "virerror.h" =20 #define VIR_FROM_THIS VIR_FROM_NONE @@ -1168,7 +1167,7 @@ virBitmapNewString(const char *string) return NULL; =20 for (i =3D 0; i < len; i++) { - unsigned long nibble =3D virHexToBin(string[len - i - 1]); + unsigned long nibble =3D g_ascii_xdigit_value(string[len - i - 1]); nibble <<=3D VIR_BITMAP_BIT_OFFSET(i * 4); bitmap->map[VIR_BITMAP_UNIT_OFFSET(i * 4)] |=3D nibble; } diff --git a/src/util/virmacaddr.c b/src/util/virmacaddr.c index 182bd582fb..35918bca41 100644 --- a/src/util/virmacaddr.c +++ b/src/util/virmacaddr.c @@ -23,7 +23,6 @@ =20 #include "virmacaddr.h" #include "virrandom.h" -#include "virutil.h" #include "viralloc.h" =20 static const unsigned char virMacAddrBroadcastAddrRaw[VIR_MAC_BUFLEN] =3D @@ -213,8 +212,8 @@ virMacAddrParseHex(const char *str, virMacAddrPtr addr) return -1; =20 for (i =3D 0; i < VIR_MAC_BUFLEN; i++) - addr->addr[i] =3D (virHexToBin(str[2 * i]) << 4 | - virHexToBin(str[2 * i + 1])); + addr->addr[i] =3D (g_ascii_xdigit_value(str[2 * i]) << 4 | + g_ascii_xdigit_value(str[2 * i + 1])); return 0; } =20 diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 4362da6cee..b0f7b6a977 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -28,7 +28,6 @@ #include "virconf.h" #include "viralloc.h" #include "virlog.h" -#include "viruuid.h" #include "vmx.h" #include "viruri.h" #include "virstring.h" @@ -673,7 +672,8 @@ virVMXUnescapeHex(char *string, char escape) if (!g_ascii_isxdigit(tmp1[1]) || !g_ascii_isxdigit(tmp1[2])) return -1; =20 - *tmp2++ =3D virHexToBin(tmp1[1]) * 16 + virHexToBin(tmp1[2]); + *tmp2++ =3D g_ascii_xdigit_value(tmp1[1]) * 16 + + g_ascii_xdigit_value(tmp1[2]); tmp1 +=3D 3; } else { *tmp2++ =3D *tmp1++; --=20 2.24.1 From nobody Thu May 2 14:10:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1582489294; cv=none; d=zohomail.com; s=zohoarc; b=GycnBkJncIL6bOFlM9xnPgYYFRO2oPaRGY28px/SetAd2y4Ombt3wMQgJKbG/FIkb7BMc+bJOoSs8btHyo1NMLNfC1r6vDe3VKgbidL023nb20Q1lUSXhx1Q1GsicudA5wdps5Kh4czbfG3fp3VDdDWzpxDexgUr+BRzMJc4egE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582489294; 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=JgfSX258n30IRcxRTQxCzeHz2VyEB95TuZ2xrEO7KD8=; b=IFtgVFvgO+V2MFoeY7nQH4uNn2W17nsvoBTLCMSD9lraCI3ujVQHp0ohZ6YesybSXNLiSDt/CEb+BbQ2dkgyeKIwq7zj+gLYTX/EVYdP2rAHRHvmIZinHIL2I+u2hC/j/1c1I9CJAT40mTxYN8blFi6e/SKdj7WnmshEbUPsdR8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1582489294427366.5976061526351; Sun, 23 Feb 2020 12:21:34 -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-165-lHvR2DOYM7CiGy0BkszwJg-1; Sun, 23 Feb 2020 15:21:30 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4D3B6107ACCC; Sun, 23 Feb 2020 20:21:25 +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 08C5E5C241; Sun, 23 Feb 2020 20:21:25 +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 9AEA518089D5; Sun, 23 Feb 2020 20:21:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01NKL2dO023734 for ; Sun, 23 Feb 2020 15:21:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id DE1FD91833; Sun, 23 Feb 2020 20:21:02 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-20.brq.redhat.com [10.40.200.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 20AE45C105 for ; Sun, 23 Feb 2020 20:21:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582489293; 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=JgfSX258n30IRcxRTQxCzeHz2VyEB95TuZ2xrEO7KD8=; b=WgumqKvYNXMLng0uECFYfutesDcNwaZcacMhpvMLu3z6nqz8Zi/TmRuf2B287dYBNB0Ur4 Tuin/p7RzM4IGeQna/8g91p6ZOPwZKmkheQjCqbvywZMnJ8Cn+5wJtksZGbOUzIRpvP2Z2 GniirMvBwy96cQn6U9XK0K9KfXq/ghA= X-MC-Unique: lHvR2DOYM7CiGy0BkszwJg-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/3] util: remove virHexToBin Date: Sun, 23 Feb 2020 21:20:54 +0100 Message-Id: <129792db6da77a6f421c6933ac33dbfe01b02745.1582489237.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Now that it is no longer used. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Laine Stump --- src/libvirt_private.syms | 1 - src/util/virutil.c | 15 --------------- src/util/virutil.h | 2 -- 3 files changed, 18 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 907cef2390..b268142d67 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3408,7 +3408,6 @@ virGetUserID; virGetUserName; virGetUserRuntimeDirectory; virGetUserShell; -virHexToBin; virHostGetDRMRenderNode; virHostHasIOMMU; virIndexToDiskName; diff --git a/src/util/virutil.c b/src/util/virutil.c index bdb79c7f1b..f77ee05dbf 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -164,21 +164,6 @@ int virSetSockReuseAddr(int fd, bool fatal) #endif =20 =20 -/* Convert C from hexadecimal character to integer. */ -int -virHexToBin(unsigned char c) -{ - switch (c) { - default: return c - '0'; - case 'a': case 'A': return 10; - case 'b': case 'B': return 11; - case 'c': case 'C': return 12; - case 'd': case 'D': return 13; - case 'e': case 'E': return 14; - case 'f': case 'F': return 15; - } -} - /* Scale an integer VALUE in-place by an optional case-insensitive * SUFFIX, defaulting to SCALE if suffix is NULL or empty (scale is * typically 1 or 1024). Recognized suffixes include 'b' or 'bytes', diff --git a/src/util/virutil.h b/src/util/virutil.h index 7377c8c8da..cc6b82a177 100644 --- a/src/util/virutil.h +++ b/src/util/virutil.h @@ -44,8 +44,6 @@ int virScaleInteger(unsigned long long *value, const char= *suffix, unsigned long long scale, unsigned long long limit) ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; =20 -int virHexToBin(unsigned char c); - int virParseVersionString(const char *str, unsigned long *version, bool allowMissing); =20 --=20 2.24.1