From nobody Mon Feb 9 01:22:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1666620926; cv=none; d=zohomail.com; s=zohoarc; b=bQsuZ46DKcD7dP58ocbUA+fN790jcnSr67eTIZc1mCmgHYtzrxv/O4fZolKh53iak8/ZNDkvHT9fj3CDHQ98iYa49kNqpFZwgxz3/VlOTV2yoI0ctZM/J9KUAIKncTkYKrUTn2A4yvuH5sIkdstM701TGfzkPTZoK79RUJIR0+M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666620926; 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=WkgYXm0/6XNi/eJcxxDhRHz2Hxahdc1A+R+4+n6WzvI=; b=GNdnugiLPqfcoXhgZ4FXvSF1qZ3rXp+NWrtfvorIgs1G8mzpYOSn4XIEfpTPinzPUtOqtmFw1YAOijsFZV4Rco5+rhhBP2GkaQ2rhc3lcg/3zNQ/eR6pAA6CRLdkUUuBZvEIwTdOOMFgpmavI6psTkdjamLAs7ZS1QzKHYfvAWs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1666620926907874.7217950983562; Mon, 24 Oct 2022 07:15:26 -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-422-mwmtQtpZM2WfQLBLoSkBBA-1; Mon, 24 Oct 2022 10:15:22 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 69416832D60; Mon, 24 Oct 2022 14:15:00 +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 55AC71415114; Mon, 24 Oct 2022 14:15:00 +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 3DE361946594; Mon, 24 Oct 2022 14:15:00 +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 72FFA1946595 for ; Mon, 24 Oct 2022 14:14:59 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 68F6340C83AD; Mon, 24 Oct 2022 14:14:59 +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 BB2CD40C2088 for ; Mon, 24 Oct 2022 14:14:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666620925; 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=WkgYXm0/6XNi/eJcxxDhRHz2Hxahdc1A+R+4+n6WzvI=; b=aYywplWVD+alPGJSbpSRr4vffO0uND/mdE0iqUg7i5dYtpvgsQ23m/ml3SZf2i4kfDLlM5 Mx0FFswNO1kTslVk88AvvmFpRZKVoKrvHv1Y2CMlUYpexhiBR0m4GVAdOCinpTu/aVkCIm l989QH2PNkuDuCB0lfEUm+EKAnyx/zE= X-MC-Unique: mwmtQtpZM2WfQLBLoSkBBA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/43] virNodeDevCapsDefParseULong: Use virXPathUInt instead of virXPathULong Date: Mon, 24 Oct 2022 16:14:11 +0200 Message-Id: <5876a3d64391c26a41ac9d16aed0c6aabcd41ca3.1666619795.git.pkrempa@redhat.com> 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.7 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: 1666620927946100001 Content-Type: text/plain; charset="utf-8" Fix the function argument to properly spell out 'unsigned int' and use virXPathUInt instead of virXPathULong and a temporary value. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/node_device_conf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index bdfbbab434..bb10b9dabe 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -833,15 +833,14 @@ virNodeDevCapsDefParseIntOptional(const char *xpath, static int virNodeDevCapsDefParseULong(const char *xpath, xmlXPathContextPtr ctxt, - unsigned *value, + unsigned int *value, virNodeDeviceDef *def, const char *missing_error_fmt, const char *invalid_error_fmt) { int ret; - unsigned long val; - ret =3D virXPathULong(xpath, ctxt, &val); + ret =3D virXPathUInt(xpath, ctxt, value); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, ret =3D=3D -1 ? missing_error_fmt : invalid_error_f= mt, @@ -849,7 +848,6 @@ virNodeDevCapsDefParseULong(const char *xpath, return -1; } - *value =3D val; return 0; } --=20 2.37.3