From nobody Sun Feb 8 21:29:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1666620922; cv=none; d=zohomail.com; s=zohoarc; b=Z3FHosoMr6gBP9kjyF38D2kUZQvjeMTYaxKX5vyQ2dVZZ6ux7Ly/VhdPaA9jAqolbivmKJ1Jtpnlr/otsjHzDBsw+eukr98Wr3x1uggYm+atuvRFHZ8qzYBqrv60Z/eqWcD3KOC1kLY/aEGdW0slQHBfmooLvvy0MBXmENewke0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666620922; 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=J1K/DaFCFqs5EHLiat0XgElJPSRZgZEUEoMcCs6uEwY=; b=MvlF0CiMnrRnIg2iSErJogxNj6DmAYmqMJvLI5YxQVVlzlbBIKzfH49wmnW0Mj5mdF06HbggPpZaFZctPG5Q1KoIn6KAcoBiJd+tnFXFXVU7k5OJfd5QcW2BNDrxV1ZcrhbjH4GhHO83at6882I00XBnK2ZObg8/WSdD3Rp6Zdk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1666620922787748.5302863055982; Mon, 24 Oct 2022 07:15:22 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-549-18NDFuyuNY68ILstEVvs1w-1; Mon, 24 Oct 2022 10:15:08 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9F2E9811E84; Mon, 24 Oct 2022 14:14:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8CA6CC15BB2; Mon, 24 Oct 2022 14:14:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A297F19465B5; Mon, 24 Oct 2022 14:14:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1C398194658D for ; Mon, 24 Oct 2022 14:14:52 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0272E40C2064; Mon, 24 Oct 2022 14:14:52 +0000 (UTC) Received: from speedmetal.lan (ovpn-208-27.brq.redhat.com [10.40.208.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 715EF40C2140 for ; Mon, 24 Oct 2022 14:14:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666620920; 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=J1K/DaFCFqs5EHLiat0XgElJPSRZgZEUEoMcCs6uEwY=; b=GWAJjYFNk4z/9ErcZNCOX+et6F1q0iYJ+kHzyDWcZIpoljVRmkZNFgPCY47kwWuuRbLqDu 2eFQchPliKUhjQVJ/Zorh5kQlaerVXUu9zWpE/Wel5Od1AO5D10/7bSWau8UYfLdYwo8ab uMB8T5RTcTLWNpAMnvHNb9TysmFwSEo= X-MC-Unique: 18NDFuyuNY68ILstEVvs1w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 01/43] util: xml: Remove unused virXPathNumber Date: Mon, 24 Oct 2022 16:14:06 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1666620923808100005 Content-Type: text/plain; charset="utf-8" 'virXPathNumber' is not used currently, remove it. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/libvirt_private.syms | 1 - src/util/virxml.c | 33 --------------------------------- src/util/virxml.h | 4 ---- 3 files changed, 38 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 0b0ccbafe5..61003eff39 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3699,7 +3699,6 @@ virXPathLongHex; virXPathLongLong; virXPathNode; virXPathNodeSet; -virXPathNumber; virXPathString; virXPathUInt; virXPathULong; diff --git a/src/util/virxml.c b/src/util/virxml.c index 0548a29e65..d99b060b63 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -90,39 +90,6 @@ virXPathString(const char *xpath, } -/** - * virXPathNumber: - * @xpath: the XPath string to evaluate - * @ctxt: an XPath context - * @value: the returned double value - * - * Convenience function to evaluate an XPath number - * - * Returns 0 in case of success in which case @value is set, - * or -1 if the evaluation failed. - */ -int -virXPathNumber(const char *xpath, - xmlXPathContextPtr ctxt, - double *value) -{ - g_autoptr(xmlXPathObject) obj =3D NULL; - - if ((ctxt =3D=3D NULL) || (xpath =3D=3D NULL) || (value =3D=3D NULL)) { - virReportError(VIR_ERR_INTERNAL_ERROR, - "%s", _("Invalid parameter to virXPathNumber()")); - return -1; - } - obj =3D xmlXPathEval(BAD_CAST xpath, ctxt); - if ((obj =3D=3D NULL) || (obj->type !=3D XPATH_NUMBER) || - (isnan(obj->floatval))) { - return -1; - } - - *value =3D obj->floatval; - return 0; -} - static int virXPathLongBase(const char *xpath, xmlXPathContextPtr ctxt, diff --git a/src/util/virxml.h b/src/util/virxml.h index febc7cbdfb..6d61d91497 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -51,10 +51,6 @@ char * virXPathString(const char *xpath, xmlXPathContextPtr ctxt); int -virXPathNumber(const char *xpath, - xmlXPathContextPtr ctxt, - double *value); -int virXPathInt(const char *xpath, xmlXPathContextPtr ctxt, int *value); --=20 2.37.3