From nobody Fri May 3 01:59:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1595339756; cv=none; d=zohomail.com; s=zohoarc; b=OifRXPVhxwRERjUHgcvK9UpbBxLTkvbl6a349ESv68g3OQk468/PGsr8dEF8H4bMufjPUKl7dc5gxWfbKSIChfHofnEl6FZfNAvgph9DzDGntJilav/0sssqAlnQdTOB5jPfYQbz9SIONJBRxn+pRBg+Rankt3dNG3ADm/QmyUI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595339756; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=gToAU0vE4S7XqyQ0hX/otca9CmcdoENGUCsJORAo9vc=; b=eWkLnUKSm20OqaYioenw0pONIyghbaO2pA/DLNKilZSkuhua3K8soyKt691K/OrVBVEculptU/2wfR/5aANpLZNj/Es7GEgfaoEdLH/ERFZU5sF0FsTDi2oV6e1EdrZkcJkkvFXg+nxARS/y5zL2C5cD3GlckIVO42LPHzGBiHg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1595339756057825.6930209012671; Tue, 21 Jul 2020 06:55:56 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-478-vju-5ru-Nl6oIGVgcEmfgA-1; Tue, 21 Jul 2020 09:55:52 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 02CBA1005504; Tue, 21 Jul 2020 13:55:47 +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 D59D36931F; Tue, 21 Jul 2020 13:55:46 +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 5D1B0730C2; Tue, 21 Jul 2020 13:55:46 +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 06LDm3Qc011942 for ; Tue, 21 Jul 2020 09:48:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8B1495D9D5; Tue, 21 Jul 2020 13:48:03 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.192.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C72C5D9D3 for ; Tue, 21 Jul 2020 13:48:00 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id D78B0240A06; Tue, 21 Jul 2020 15:47:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595339754; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=gToAU0vE4S7XqyQ0hX/otca9CmcdoENGUCsJORAo9vc=; b=JLwg3ojDf/Msb5833quLgAJC2dPW0lDR+aNI25ZNP+X+aowgD57rTutWkrC/PvW+IaniqX qO+qpXMy5Qcgvww103Gn629N9jBTlzswlhWgzjxQrOSE3C+Cp+eSc/tFnihr7LmJs8S6B7 aY2hY9cIpeaoQai8r4egra99Cwzcdvk= X-MC-Unique: vju-5ru-Nl6oIGVgcEmfgA-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: Drop ret variable from qemuConnectCPUModelComparison Date: Tue, 21 Jul 2020 15:47:55 +0200 Message-Id: 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.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_driver.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b8ba2e3fb9..8e81c30a93 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13150,7 +13150,6 @@ qemuConnectCPUModelComparison(virQEMUCapsPtr qemuCa= ps, { g_autoptr(qemuProcessQMP) proc =3D NULL; g_autofree char *result =3D NULL; - int ret =3D VIR_CPU_COMPARE_ERROR; =20 if (!(proc =3D qemuProcessQMPNew(virQEMUCapsGetBinary(qemuCaps), libDir, runUid, runGid, false))) @@ -13163,15 +13162,17 @@ qemuConnectCPUModelComparison(virQEMUCapsPtr qemu= Caps, return VIR_CPU_COMPARE_ERROR; =20 if (STREQ(result, "identical")) - ret =3D VIR_CPU_COMPARE_IDENTICAL; - else if (STREQ(result, "superset")) - ret =3D VIR_CPU_COMPARE_SUPERSET; - else if (failIncompatible) + return VIR_CPU_COMPARE_IDENTICAL; + + if (STREQ(result, "superset")) + return VIR_CPU_COMPARE_SUPERSET; + + if (failIncompatible) { virReportError(VIR_ERR_CPU_INCOMPATIBLE, NULL); - else - ret =3D VIR_CPU_COMPARE_INCOMPATIBLE; + return VIR_CPU_COMPARE_ERROR; + } =20 - return ret; + return VIR_CPU_COMPARE_INCOMPATIBLE; } =20 =20 --=20 2.27.0