From nobody Sun Feb 8 11:26:11 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1537793816671815.3127107422472; Mon, 24 Sep 2018 05:56:56 -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 895AF3082E72; Mon, 24 Sep 2018 12:56:54 +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 444625C21F; Mon, 24 Sep 2018 12:56:54 +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 EB61A4BB75; Mon, 24 Sep 2018 12:56:53 +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 w8OCuds5004581 for ; Mon, 24 Sep 2018 08:56:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 880055D9CA; Mon, 24 Sep 2018 12:56:39 +0000 (UTC) Received: from unknown4CEB42C824F4.redhat.com (ovpn-116-62.phx2.redhat.com [10.3.116.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4731D5D9CB for ; Mon, 24 Sep 2018 12:56:39 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 24 Sep 2018 08:56:34 -0400 Message-Id: <20180924125635.5884-2-jferlan@redhat.com> In-Reply-To: <20180924125635.5884-1-jferlan@redhat.com> References: <20180924125635.5884-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/2] lxc: Remove unnecessary error 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: , MIME-Version: 1.0 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.46]); Mon, 24 Sep 2018 12:56:55 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since lxcConvertSize already creates an error message, there is no need to use an error: label in lxcSetMemTune to just overwrite or essentially rewrite the same error. So remove the label. Signed-off-by: John Ferlan --- src/lxc/lxc_native.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c index e1992fd1f9..cb20f1f5cf 100644 --- a/src/lxc/lxc_native.c +++ b/src/lxc/lxc_native.c @@ -763,7 +763,7 @@ lxcSetMemTune(virDomainDefPtr def, virConfPtr propertie= s) "lxc.cgroup.memory.limit_in_bytes", &value) > 0) { if (lxcConvertSize(value, &size) < 0) - goto error; + return -1; size =3D size / 1024; virDomainDefSetMemoryTotal(def, size); def->mem.hard_limit =3D virMemoryLimitTruncate(size); @@ -773,7 +773,7 @@ lxcSetMemTune(virDomainDefPtr def, virConfPtr propertie= s) "lxc.cgroup.memory.soft_limit_in_bytes", &value) > 0) { if (lxcConvertSize(value, &size) < 0) - goto error; + return -1; def->mem.soft_limit =3D virMemoryLimitTruncate(size / 1024); } =20 @@ -781,16 +781,10 @@ lxcSetMemTune(virDomainDefPtr def, virConfPtr propert= ies) "lxc.cgroup.memory.memsw.limit_in_bytes", &value) > 0) { if (lxcConvertSize(value, &size) < 0) - goto error; + return -1; def->mem.swap_hard_limit =3D virMemoryLimitTruncate(size / 1024); } return 0; - - error: - virReportError(VIR_ERR_INTERNAL_ERROR, - _("failed to parse integer: '%s'"), value); - return -1; - } =20 static int --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list