From nobody Wed Nov 27 04:35:09 2024 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=1559208891; cv=none; d=zoho.com; s=zohoarc; b=LaBJeMyqjhuP2rBAqAIFGqecyK6uTQv8f1Ng53DHKC01dnau2ElOQqJzQgI5NZ+SHzv7gOIoFgQ1G7Cbwykf0zV5WVwuzrBum6O8WR83HR7ip0YuljijbW82t0yF1Wn1VfLQ1crxOPGBiHf0uGHzKtyGeDqCk4PxidSHY4tmYPg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559208891; h=Content-Type:Content-Transfer-Encoding:Cc: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=PNb2fG+Y4sSVr1fz7G28CWxr/Rc8oObLpfIxDT9/AsY=; b=JcNa6YUaAVh0tVQtcJzEPBxK+QQEuNuAkuW12FUk13ehBl68U+vmmp53HrqqOQ2+I2RqADKDcnxsSxg6slNOC1UBAuzLPLWExz0cyd+XgfIi0IeNh5yYPsUL8gOWSDOM6GQNzt/c152Eld2KE1e+d/o31thNlcNQAEDrw60v9To= 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 1559208891389115.2107796365857; Thu, 30 May 2019 02:34:51 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 12D39C13070F; Thu, 30 May 2019 09:34:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B1B91724A; Thu, 30 May 2019 09:34:25 +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 1ECA21806B0F; Thu, 30 May 2019 09:34:12 +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 x4U9YATF027453 for ; Thu, 30 May 2019 05:34:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9BB4D60C7E; Thu, 30 May 2019 09:34:10 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id F32B97D536; Thu, 30 May 2019 09:34:09 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Thu, 30 May 2019 11:33:56 +0200 Message-Id: <96158fedd7e6a3fe0bb68c58298991b917536712.1559208506.git.mprivozn@redhat.com> 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 Cc: nshirokovskiy@virtuozzo.com Subject: [libvirt] [PATCH 1/9] virDomainObjListAddLocked: Drop useless @cleanup label 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-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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 30 May 2019 09:34:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" It's a premature optimization. It's perfectly acceptable for 'error' label to deal with @vm =3D=3D NULL case. Signed-off-by: Michal Privoznik Reviewed-by: Nikolay Shirokovskiy --- src/conf/virdomainobjlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c index f5a7ecc4a4..d58d25f847 100644 --- a/src/conf/virdomainobjlist.c +++ b/src/conf/virdomainobjlist.c @@ -332,7 +332,7 @@ virDomainObjListAddLocked(virDomainObjListPtr doms, } =20 if (!(vm =3D virDomainObjNew(xmlopt))) - goto cleanup; + goto error; vm->def =3D def; =20 if (virDomainObjListAddObjLocked(doms, vm) < 0) { @@ -340,7 +340,7 @@ virDomainObjListAddLocked(virDomainObjListPtr doms, goto error; } } - cleanup: + return vm; =20 error: --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list