From nobody Sun Feb 8 18:43:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1639052525; cv=none; d=zohomail.com; s=zohoarc; b=IrHL6IuJkZUBW5Cxqkq2BumR8izMKjKafusaIn5GILgDIo0MDCdi7Fd80BunAKumdXk6XI0K9p4uil+qN2d7mkuHJy0cKpORCWGEahh2et+R14Rp6R7vAHH9/K+x4Jl7WnCsXTa1piFtB692eUPppG7csvn1W/hStnrOTLP4Bw4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639052525; 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=SW7V+SZWHJFp3SN+nE9bwIuDGCJCWSVHz9D9RWMh6aM=; b=lUnXP3JdVoPRvM/TQ7onmquz0gL9xuBM3hJ5QK4Q6iz+CFl6fU4om4XmMMTR6h5VXxbpaKPb/AJ45WQnrxPu34nmC1xBSO38/FRjKfLLBFVoWMkw9/uMoABBzQvj61q6PkE49nv+bxs1DqFVFEy4c/heSuoi/PcHWsycGNDpOhc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1639052525682699.9858271730268; Thu, 9 Dec 2021 04:22:05 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-539-brzxTNfPP76K07h-Ebci5w-1; Thu, 09 Dec 2021 07:20:35 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 022ED802CBA; Thu, 9 Dec 2021 12:20:30 +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 D278A45D74; Thu, 9 Dec 2021 12:20:29 +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 9F2751802E2C; Thu, 9 Dec 2021 12:20:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B9CKOpF014601 for ; Thu, 9 Dec 2021 07:20:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id 23B1C5E26C; Thu, 9 Dec 2021 12:20:24 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8222F5ED39 for ; Thu, 9 Dec 2021 12:20:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639052524; 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=SW7V+SZWHJFp3SN+nE9bwIuDGCJCWSVHz9D9RWMh6aM=; b=SIpDfyraMUxXE1Ct9+kpGetRiTwMMlHkrSRz5b5k56cr8YrfVDnoUVpJPGR+Hd93GUHhcN +MI0rZscZSPrJcGcYWDBZIGZOh2TFZ99ygIxhxdOmdNySWR63lByQUbOWZrfUoV7/9I3iq V7yf77e2yw5+LRxIiPhOs/q3AAI4u6U= X-MC-Unique: brzxTNfPP76K07h-Ebci5w-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 22/36] virBitmapUnion: Remove return value Date: Thu, 9 Dec 2021 13:18:27 +0100 Message-Id: <9132682fae8f4038b5e660fdbf2cab095bbac2f8.1639052248.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1639052527754100003 Content-Type: text/plain; charset="utf-8" The function can't fail at this point. Remove the return value. Signed-off-by: Peter Krempa --- src/util/virbitmap.c | 6 +----- src/util/virbitmap.h | 4 ++-- src/util/virnuma.c | 3 +-- tests/virbitmaptest.c | 3 +-- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 2b885803fd..c067b1f738 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -1164,10 +1164,8 @@ virBitmapIntersect(virBitmap *a, * @b: other bitmap * * Performs union of two bitmaps: a =3D union(a, b) - * - * Returns 0 on success, <0 on failure. */ -int +void virBitmapUnion(virBitmap *a, const virBitmap *b) { @@ -1178,8 +1176,6 @@ virBitmapUnion(virBitmap *a, for (i =3D 0; i < b->map_len; i++) a->map[i] |=3D b->map[i]; - - return 0; } diff --git a/src/util/virbitmap.h b/src/util/virbitmap.h index 48074d1ae6..23242b44ff 100644 --- a/src/util/virbitmap.h +++ b/src/util/virbitmap.h @@ -133,8 +133,8 @@ bool virBitmapOverlaps(virBitmap *b1, void virBitmapIntersect(virBitmap *a, virBitmap *b) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int virBitmapUnion(virBitmap *a, - const virBitmap *b) +void virBitmapUnion(virBitmap *a, + const virBitmap *b) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); void virBitmapSubtract(virBitmap *a, virBitmap *b) diff --git a/src/util/virnuma.c b/src/util/virnuma.c index 31f65d8902..7c892d6267 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -333,8 +333,7 @@ virNumaNodesetToCPUset(virBitmap *nodeset, return -1; } - if (virBitmapUnion(allNodesCPUs, nodeCPUs) < 0) - return -1; + virBitmapUnion(allNodesCPUs, nodeCPUs); } *cpuset =3D g_steal_pointer(&allNodesCPUs); diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c index 1794f73f34..4c525679f6 100644 --- a/tests/virbitmaptest.c +++ b/tests/virbitmaptest.c @@ -665,8 +665,7 @@ test15(const void *opaque) return -1; } - if (virBitmapUnion(amap, bmap) < 0) - return -1; + virBitmapUnion(amap, bmap); if (!virBitmapEqual(amap, resmap)) { fprintf(stderr, --=20 2.31.1