From nobody Mon Feb 9 04:31: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 ARC-Seal: i=1; a=rsa-sha256; t=1566852329; cv=none; d=zoho.com; s=zohoarc; b=cX2grY2lB83Td8SW58dtaWXSpWQ0sO/Iv2azvtA6SZWuslJTqjhbfIuJlUqC7TkqbFf0rmVjS7lx2Jtdx7rpwNL/qjx/PcPDDcVMmkkmBqtkotxiQkYR6AsPmkcO+6HzSh9je5RpIRkAeha0LFqDmtmnkRJWaZgbxpA15OxMbKw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566852329; 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:ARC-Authentication-Results; bh=d6qKZtVrGLKJSzqaQY3AhHQNpkeC3EwZuNz1540C3gw=; b=jMOsUYeEY55NLY5D5FZhJdunK3Q8EF09YNb+ib77sIgPqxVmeMzMjJYLH1lgjkFy4yBfgbjYGhVcb1+pUL2VizXi1nBaNxmFiyJtqyckRQUCF07D5hduA5wcuEWWkM/j3uvq8w02jUu3ONGQN2PrNsI1Tja2YT8XA7+ZD0KvAXI= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156685232964288.4904801271698; Mon, 26 Aug 2019 13:45:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4A4FD86679; Mon, 26 Aug 2019 20:45:28 +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 1E56A1001938; Mon, 26 Aug 2019 20:45:28 +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 C6F4424FDE; Mon, 26 Aug 2019 20:45:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7QKjQTp020240 for ; Mon, 26 Aug 2019 16:45:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9725560F88; Mon, 26 Aug 2019 20:45:26 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F63760F86 for ; Mon, 26 Aug 2019 20:45:23 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 26 Aug 2019 22:44:55 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/7] qemuBuildMemoryBackendProps: use 'rc' instead of ret. 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: , Content-Type: text/plain; charset="utf-8" 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.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 26 Aug 2019 20:45:28 +0000 (UTC) Do not overwrite the 'ret' value more than once. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 262f4d0594..528e11d5a0 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3331,7 +3331,7 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendP= rops, VIR_AUTOFREE(char *) memPath =3D NULL; bool prealloc =3D false; virBitmapPtr nodemask =3D NULL; - int ret =3D -1; + int rc; VIR_AUTOPTR(virJSONValue) props =3D NULL; bool nodeSpecified =3D virDomainNumatuneNodeSpecified(def->numa, mem->= targetNode); unsigned long long pagesize =3D mem->pagesize; @@ -3545,7 +3545,7 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendP= rops, !force) { /* report back that using the new backend is not necessary * to achieve the desired configuration */ - ret =3D 1; + rc =3D 1; } else { /* otherwise check the required capability */ if (STREQ(backendType, "memory-backend-file") && @@ -3568,14 +3568,14 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backen= dProps, return -1; } =20 - ret =3D 0; + rc =3D 0; } =20 if (!(*backendProps =3D qemuMonitorCreateObjectPropsWrap(backendType, = alias, &props))) - ret =3D -1; + return -1; =20 - return ret; + return rc; } =20 =20 --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list