From nobody Sun Feb 8 23:32:14 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=1566305970; cv=none; d=zoho.com; s=zohoarc; b=Fbrn6NLFSysa7Tb7BSMIit7pzHsdrC7fllgFJzVtzo3cTeJPo9uO1+jvluMLzk38I3tezSzkENHs3EK3rXxu+OqjKwH7DQSOFzqgBnF9T0sJUkul4flIPXxMZf8BflwVlnQaCJvXjRCKcFNDKDLseodl2SwisHEWmuQK6NCA1MM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566305970; 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=cpqO296sHzjN9gZk/82WeT2iTiWTptnXBEf/T3ke7iE=; b=opDnpJyuHvKZuhtxXMMkp/pM3dPpivP+nLAPFh7RNoz6GOGOlT3cWEFPWIhW7aGBXnBj+3IhwPoEoXueEM5L6wq8WTo28TehaZDJP+DGV8Z/x+NlkJDM7ft/Lq4TNByyZ6IzKbSXlaltUE+x/PXCVQHc+xbUKQ1qH0rtQ7BrJsM= 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 1566305970879444.211095805147; Tue, 20 Aug 2019 05:59:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9BFD630A5A64; Tue, 20 Aug 2019 12:59:29 +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 78E7C18139; Tue, 20 Aug 2019 12:59: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 397BE2551E; Tue, 20 Aug 2019 12:59:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7KCxPTw023132 for ; Tue, 20 Aug 2019 08:59:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 642C818EE4; Tue, 20 Aug 2019 12:59:25 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E212787A1 for ; Tue, 20 Aug 2019 12:59:24 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 20 Aug 2019 14:59:02 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/19] qemuBuildHotpluggableCPUProps: use VIR_RETURN_PTR 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.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 20 Aug 2019 12:59:30 +0000 (UTC) This lets us get rid of the error label. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1b5cde6ec7..5e05916b23 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -11047,33 +11047,29 @@ virJSONValuePtr qemuBuildHotpluggableCPUProps(const virDomainVcpuDef *vcpu) { qemuDomainVcpuPrivatePtr vcpupriv =3D QEMU_DOMAIN_VCPU_PRIVATE(vcpu); - virJSONValuePtr ret =3D NULL; + VIR_AUTOPTR(virJSONValue) ret =3D NULL; =20 if (virJSONValueObjectCreate(&ret, "s:driver", vcpupriv->type, "s:id", vcpupriv->alias, NULL) < 0) - goto error; + return NULL; =20 if (vcpupriv->socket_id !=3D -1 && virJSONValueObjectAdd(ret, "i:socket-id", vcpupriv->socket_id, NUL= L) < 0) - goto error; + return NULL; =20 if (vcpupriv->core_id !=3D -1 && virJSONValueObjectAdd(ret, "i:core-id", vcpupriv->core_id, NULL) <= 0) - goto error; + return NULL; =20 if (vcpupriv->thread_id !=3D -1 && virJSONValueObjectAdd(ret, "i:thread-id", vcpupriv->thread_id, NUL= L) < 0) - goto error; + return NULL; =20 if (vcpupriv->node_id !=3D -1 && virJSONValueObjectAdd(ret, "i:node-id", vcpupriv->node_id, NULL) <= 0) - goto error; - - return ret; + return NULL; =20 - error: - virJSONValueFree(ret); - return NULL; + VIR_RETURN_PTR(ret); } =20 =20 --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list