From nobody Sat Feb 7 10:50:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1537457162249691.9606892443002; Thu, 20 Sep 2018 08:26:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6D468A6E1E; Thu, 20 Sep 2018 15:26:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3200D16ECB; Thu, 20 Sep 2018 15:26:00 +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 C24244A46F; Thu, 20 Sep 2018 15:25:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8KFPdjt022194 for ; Thu, 20 Sep 2018 11:25:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3C3682010D02; Thu, 20 Sep 2018 15:25:39 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B33832010D0D for ; Thu, 20 Sep 2018 15:25:38 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 20 Sep 2018 17:25:24 +0200 Message-Id: <20180920152529.25973-7-abologna@redhat.com> In-Reply-To: <20180920152529.25973-1-abologna@redhat.com> References: <20180920152529.25973-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 06/11] qemu: Remove unnecessary variables 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 20 Sep 2018 15:26:01 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index aa2de9018c..01be627af0 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -804,7 +804,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps, virArch guestarch) { virCapsGuestPtr guest; - bool haskvm =3D false; virCapsGuestMachinePtr *machines =3D NULL; size_t nmachines =3D 0; int ret =3D -1; @@ -813,9 +812,6 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps, if (!binary) return 0; =20 - if (virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KVM)) - haskvm =3D true; - if (virQEMUCapsGetMachineTypesCaps(qemubinCaps, &nmachines, &machines)= < 0) goto cleanup; =20 @@ -856,15 +852,13 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps, NULL) =3D=3D NULL) goto cleanup; =20 - if (haskvm) { - virCapsGuestDomainPtr dom; - - if ((dom =3D virCapabilitiesAddGuestDomain(guest, - VIR_DOMAIN_VIRT_KVM, - NULL, - NULL, - 0, - NULL)) =3D=3D NULL) { + if (virQEMUCapsGet(qemubinCaps, QEMU_CAPS_KVM)) { + if (virCapabilitiesAddGuestDomain(guest, + VIR_DOMAIN_VIRT_KVM, + NULL, + NULL, + 0, + NULL) =3D=3D NULL) { goto cleanup; } } --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list