From nobody Sun Feb 8 18:44:36 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=1566852321; cv=none; d=zoho.com; s=zohoarc; b=RnYG+ZrmcSATkvjwKSVT8nwDKzWh4u/jHJWedXIqeaZhzIl6BuCu9y/p/Uf+rNGTCO+D+P5pdytpegTbqYKBKnm2DnrFdvg5dkOekHWXCDqJshZhKTo8703pzH7wI+QNONo0E+PtOtE/luWIKq7m4LCkESaKGEyp4ohHI/pTl/E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566852321; 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=1NfAL7P8ddFUwOhR4TytTVV1xK0nlVt7q6TvfSZchas=; b=iB/CtJKQepaAm8+Bvu40GOd7EEHwV6wdagB0sgDV7DslYkRxJIsKRXZbLB4IuOlNIKE4d2qQGuE39sZ4dG6rgPM1XrgslAcfJBg9FJQ0ubi+36c9Xol2LpwrCybdgCqoMp/Lzq1tQxBx198PsP41NXo1xrTuU5HCb4szwV9YHFE= 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 1566852321611147.0105278516619; Mon, 26 Aug 2019 13:45:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2A0893084045; Mon, 26 Aug 2019 20:45:20 +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 F175260619; Mon, 26 Aug 2019 20:45:19 +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 AC1B2180221F; Mon, 26 Aug 2019 20:45:19 +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 x7QKjHr3020201 for ; Mon, 26 Aug 2019 16:45:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id DBFBE60F86; Mon, 26 Aug 2019 20:45:17 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 65A7460CC0 for ; Mon, 26 Aug 2019 20:45:17 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 26 Aug 2019 22:44:52 +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 3/7] qemuBuildHostNetStr: remove unnecessary 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-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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 26 Aug 2019 20:45:20 +0000 (UTC) Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7c48a21c23..06ac184f0d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3913,13 +3913,12 @@ qemuBuildHostNetStr(virDomainNetDefPtr net, VIR_AUTOCLEAN(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; virDomainNetType netType =3D virDomainNetGetActualType(net); size_t i; - char *ret =3D NULL; =20 if (net->script && netType !=3D VIR_DOMAIN_NET_TYPE_ETHERNET) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("scripts are not supported on interfaces of type = %s"), virDomainNetTypeToString(netType)); - goto cleanup; + return NULL; } =20 switch (netType) { @@ -3983,7 +3982,7 @@ qemuBuildHostNetStr(virDomainNetDefPtr net, const char *prefix =3D ""; =20 if (!(addr =3D virSocketAddrFormat(&ip->address))) - goto cleanup; + return NULL; =20 if (VIR_SOCKET_ADDR_IS_FAMILY(&ip->address, AF_INET)) prefix =3D "net=3D"; @@ -4039,11 +4038,9 @@ qemuBuildHostNetStr(virDomainNetDefPtr net, =20 virBufferTrim(&buf, ",", -1); if (virBufferCheckError(&buf) < 0) - goto cleanup; + return NULL; =20 - ret =3D virBufferContentAndReset(&buf); - cleanup: - return ret; + return virBufferContentAndReset(&buf); } =20 =20 --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list