From nobody Sat Feb 7 06:20:40 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=1672936245; cv=none; d=zohomail.com; s=zohoarc; b=Cfa9TLvPJFlWn5t0ByHOgnc2uMMgb7rVRa+mdWqCtnx41qphdlDymxdDWDUD/jO1QsBpkGlq57Jl7ajkCVoJbdnu0HOU5Z4C1jXmZy98QWNH9Ly6T7IFccZO7K/iFLq5fxL58veI5u9cXWfCo5OOyppXqXTbi5Te8+70t+0Wq+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672936245; 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=C8R8+qxsbFmLkJRN08eaD3IZ7s+rv7DSOE4Ewsaa7Ks=; b=CCINllhOfcAKMEZn9FOD1u5Cazmkl/aa6jBRKvuN69kR0Cr21FhRZkgrHn3ol507RpLzmi31xAE0N/lvyOJIQJ7GwmspCn18RTfTO0vBr4dZmigERHQbaHGsFMDFXoA9Lk/TdmX8J2bsmMAWTYyL/+X4vg2dZ7TwrIrwk1+OThI= 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 1672936245966999.9793815339315; Thu, 5 Jan 2023 08:30:45 -0800 (PST) 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-463-XaeAO62RNBOZtCK18ZqU5A-1; Thu, 05 Jan 2023 11:30:38 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DC31A86C164; Thu, 5 Jan 2023 16:30:34 +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 C87061121315; Thu, 5 Jan 2023 16:30:34 +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 9232B1946A71; Thu, 5 Jan 2023 16:30:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5CB2D1946A72 for ; Thu, 5 Jan 2023 16:30:33 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4DDD02166B30; Thu, 5 Jan 2023 16:30:33 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-20.brq.redhat.com [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id A456D2166B32 for ; Thu, 5 Jan 2023 16:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672936244; 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=C8R8+qxsbFmLkJRN08eaD3IZ7s+rv7DSOE4Ewsaa7Ks=; b=P4yjdb/4ey8mAPS45UwNviiV2SkbUn7zvNV9kEMCnYt2VLM6yGRZ2npELaTf4AuG4D8qLX Vd/ksqGzN+jU/IH3q9PuBGd1kUdS6Hs+7T2FrKcCEWgHrME/0/qR6EwMFfndjeN1Okflb0 eVfS0ajzqdtraa6z5IWtFErz9Hfiat8= X-MC-Unique: XaeAO62RNBOZtCK18ZqU5A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/36] conf: virdomainobjlist: Remove return value from virDomainObjListCollect Date: Thu, 5 Jan 2023 17:29:54 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.3 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: 1672936247479100003 Content-Type: text/plain; charset="utf-8" The function can't fail so there's no point in returning anything. Signed-off-by: Peter Krempa Reviewed-by: Jonathon Jongsma Reviewed-by: Pavel Hrdina --- src/conf/virdomainobjlist.c | 7 ++----- src/conf/virdomainobjlist.h | 2 +- src/qemu/qemu_driver.c | 7 +++---- src/test/test_driver.c | 4 +--- src/vz/vz_driver.c | 7 +++---- 5 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c index 4968dfcf3e..13675acda5 100644 --- a/src/conf/virdomainobjlist.c +++ b/src/conf/virdomainobjlist.c @@ -964,7 +964,7 @@ virDomainObjListFilter(virDomainObj ***list, } -int +void virDomainObjListCollect(virDomainObjList *domlist, virConnectPtr conn, virDomainObj ***vms, @@ -974,8 +974,6 @@ virDomainObjListCollect(virDomainObjList *domlist, { virDomainObjListCollectAll(domlist, vms, nvms); virDomainObjListFilter(vms, nvms, conn, filter, flags); - - return 0; } @@ -1046,8 +1044,7 @@ virDomainObjListExport(virDomainObjList *domlist, size_t i; int ret =3D -1; - if (virDomainObjListCollect(domlist, conn, &vms, &nvms, filter, flags)= < 0) - return -1; + virDomainObjListCollect(domlist, conn, &vms, &nvms, filter, flags); if (domains) { doms =3D g_new0(virDomainPtr, nvms + 1); diff --git a/src/conf/virdomainobjlist.h b/src/conf/virdomainobjlist.h index 8c53680374..058f2c4ca6 100644 --- a/src/conf/virdomainobjlist.h +++ b/src/conf/virdomainobjlist.h @@ -149,7 +149,7 @@ void virDomainObjListCollectAll(virDomainObjList *domlist, virDomainObj ***vms, size_t *nvms); -int +void virDomainObjListCollect(virDomainObjList *doms, virConnectPtr conn, virDomainObj ***vms, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d509582719..1b3da86c81 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -18665,10 +18665,9 @@ qemuConnectGetAllDomainStats(virConnectPtr conn, lflags, true) < 0) return -1; } else { - if (virDomainObjListCollect(driver->domains, conn, &vms, &nvms, - virConnectGetAllDomainStatsCheckACL, - lflags) < 0) - return -1; + virDomainObjListCollect(driver->domains, conn, &vms, &nvms, + virConnectGetAllDomainStatsCheckACL, + lflags); } tmpstats =3D g_new0(virDomainStatsRecordPtr, nvms + 1); diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 6c21c6bcb4..bd6f063a00 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -9923,9 +9923,7 @@ testConnectGetAllDomainStats(virConnectPtr conn, &nvms, NULL, lflags, true) < 0) return -1; } else { - if (virDomainObjListCollect(driver->domains, conn, &vms, &nvms, - NULL, lflags) < 0) - return -1; + virDomainObjListCollect(driver->domains, conn, &vms, &nvms, NULL, = lflags); } tmpstats =3D g_new0(virDomainStatsRecordPtr, nvms + 1); diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index d5147a6c0d..327704b375 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -3771,10 +3771,9 @@ vzConnectGetAllDomainStats(virConnectPtr conn, lflags, true) < 0) return -1; } else { - if (virDomainObjListCollect(driver->domains, conn, &doms, &ndoms, - virConnectGetAllDomainStatsCheckACL, - lflags) < 0) - return -1; + virDomainObjListCollect(driver->domains, conn, &doms, &ndoms, + virConnectGetAllDomainStatsCheckACL, + lflags); } tmpstats =3D g_new0(virDomainStatsRecordPtr, ndoms + 1); --=20 2.38.1