From nobody Mon Feb 9 08:28:28 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=1680183545; cv=none; d=zohomail.com; s=zohoarc; b=fJkKPEOz5DcisCtceae2OK+yyV5yw2/CjpOm1XfInI90dhW6Vh5+PtnkwZzpQBzITo2qhxQdHVg946GsQckuxiB7CjjCH+mKJMblZYH9n+YqyVLCFvJ0hylEkFdNY01Zp3Q1Qr9SMWBFR5NMMOZFuEzma/aUzmHWP/Dy1k/ql00= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680183545; 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=6ewI0gX0XVxzBMviKE4vUXkfQzVJ3/NoU4YeoZfJJ7c=; b=TT7EPSvNAfHi74kXdDnoJlv0wSk7um0QYhRKeOXU/iM/GvUH2bbEvr7+PKDatIbPrXldkEFO8oBkpvMC++Ap2dhoSGTiFqUAni1n+CQ6wQ/LaOES4UNeFvKyFjCPUCzkpxo+TuuJq5JyYcoIul6OO+FIb8Ju9ikM4yo3nMfiQoM= 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 1680183545166617.3167165310653; Thu, 30 Mar 2023 06:39:05 -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-385-FUsZ3XpsPxWEgey-rH2q-A-1; Thu, 30 Mar 2023 09:39:00 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3C34A185A791; Thu, 30 Mar 2023 13:38:56 +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 28B6640BC797; Thu, 30 Mar 2023 13:38:56 +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 5513A1946A63; Thu, 30 Mar 2023 13:38:42 +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 6B38F19465B2 for ; Thu, 30 Mar 2023 13:38:31 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4FE512166B35; Thu, 30 Mar 2023 13:38:31 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id B00F72166B33 for ; Thu, 30 Mar 2023 13:38:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680183544; 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=6ewI0gX0XVxzBMviKE4vUXkfQzVJ3/NoU4YeoZfJJ7c=; b=bHHxLZwTBB2FVlUYEAp6DYuOyi1fq08rhMpteqe1C+v2fOGFqoc9wXV0uwHp5HG4cIBQe8 IYgnQuhm0yPIVrKIQuuq3ixn9lTE9BCW9YpfH+zv/kOBN0ME6Nkf77/bOGI68AP6radofe eBdX1tcPIKP9STx6apFDwDbLhl/+D/A= X-MC-Unique: FUsZ3XpsPxWEgey-rH2q-A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 04/31] virQEMUCapsGetMachineTypesCaps: Remove return value Date: Thu, 30 Mar 2023 15:37:58 +0200 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.2 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: 1680183545834100001 Content-Type: text/plain; charset="utf-8" The function always returns 0. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 6355c80f30..0201f288b3 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1015,7 +1015,7 @@ virQEMUCapsInitGuest(virCaps *caps, } -static int +static void virQEMUCapsGetMachineTypesCaps(virQEMUCaps *qemuCaps, size_t *nmachines, virCapsGuestMachine ***machines) @@ -1037,7 +1037,7 @@ virQEMUCapsGetMachineTypesCaps(virQEMUCaps *qemuCaps, *nmachines =3D accel->nmachineTypes; if (*nmachines =3D=3D 0) - return 0; + return; array =3D g_ptr_array_sized_new(*nmachines); @@ -1093,8 +1093,6 @@ virQEMUCapsGetMachineTypesCaps(virQEMUCaps *qemuCaps, *machines =3D g_new0(virCapsGuestMachine *, array->len); for (i =3D 0; i < array->len; ++i) (*machines)[i] =3D g_ptr_array_index(array, i); - - return 0; } @@ -1112,8 +1110,7 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps, if (!binary) return 0; - if (virQEMUCapsGetMachineTypesCaps(qemuCaps, &nmachines, &machines) < = 0) - goto cleanup; + virQEMUCapsGetMachineTypesCaps(qemuCaps, &nmachines, &machines); /* We register kvm as the base emulator too, since we can * just give -no-kvm to disable acceleration if required */ @@ -1160,8 +1157,6 @@ virQEMUCapsInitGuestFromBinary(virCaps *caps, ret =3D 0; - cleanup: - virCapabilitiesFreeMachines(machines, nmachines); return ret; --=20 2.39.2