From nobody Mon Feb 9 10:30:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1637601187; cv=none; d=zohomail.com; s=zohoarc; b=YKR0TiHmAB9dfw9oz2zl0nTyzS1FwnI+rGbzwGW3e5sqBMgdzInkuoM01uzDSSuSKiXbYN0dDxs69/VlX+haluoQhJ33tPwKl4gPWg4digDkWNqyw4qRnnZz8cNSUlDNuEl++oQQO1C5oYWoqQhEJseGKNO9Qkd5TLrKpiGnJhg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637601187; 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; bh=HamAXS7QoHj8jcL3Wb3lZQ8dQ5qCKsmsD0T2r///DgA=; b=Xg8Nx4dT0kA4jX8hYzHI1mo98ipbrFKlciFZ5qWUqUPfNIJHqt7JmUsN1ey2YfFXo9Ofc3k6IrnNNhqfwVoLpUGmQmkCOtiSiyGHsvTmvUan495+8gT1RNyHN2FHrcrWgAy689isZVIvyKdDnOdfm0AnODhcXuQq7nIbVq6oPwM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1637601187245226.92360693633827; Mon, 22 Nov 2021 09:13:07 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-353-gHtAu993NWKnp9OcaSvsTQ-1; Mon, 22 Nov 2021 12:12:55 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9C1BA19057D6; Mon, 22 Nov 2021 17:12:48 +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 7D870ADCD; Mon, 22 Nov 2021 17:12:48 +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 522781832E85; Mon, 22 Nov 2021 17:12:48 +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 1AMHCgAQ029324 for ; Mon, 22 Nov 2021 12:12:42 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9855B60FFE; Mon, 22 Nov 2021 17:12:42 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB19260CC3 for ; Mon, 22 Nov 2021 17:12:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637601186; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=HamAXS7QoHj8jcL3Wb3lZQ8dQ5qCKsmsD0T2r///DgA=; b=WJDbFi8PP6eDu2QJaMSzv/UbXW5oTI8C5cdt8pSziyXSUCXNWBmVs7xLdnOvTZAN3XvP3o 81aDmRJu9vX5I6UHerESV8bhKqrcgA3noa8TryQMnwD7Y3OwJlTrYfMx5iVPs/QuwdubXC UnZd7gAs8VqyAwR4aSDUG8MiKnP67lg= X-MC-Unique: gHtAu993NWKnp9OcaSvsTQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/12] virSecurityLabelDefParseXML: Remove pointless 'error' label Date: Mon, 22 Nov 2021 18:12:26 +0100 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 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1637601188476100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 99bee98df8..ee44bbbd4b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7808,7 +7808,7 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt, VIR_SECURITY_MODEL_BUFLEN - 1); if (!(seclabel =3D virSecurityLabelDefNew(model))) - goto error; + return NULL; /* set default value */ seclabel->type =3D VIR_DOMAIN_SECLABEL_DYNAMIC; @@ -7817,7 +7817,7 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt, virDomainSeclabelTypeFromString, VIR_XML_PROP_NONZERO, &seclabel->type) < 0) - goto error; + return NULL; if (seclabel->type =3D=3D VIR_DOMAIN_SECLABEL_STATIC || seclabel->type =3D=3D VIR_DOMAIN_SECLABEL_NONE) @@ -7827,7 +7827,7 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt, if (virStringParseYesNo(relabel, &seclabel->relabel) < 0) { virReportError(VIR_ERR_XML_ERROR, _("invalid security relabel value '%s'"), relab= el); - goto error; + return NULL; } } @@ -7835,13 +7835,13 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt, !seclabel->relabel) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("dynamic label type must use resource relab= eling")); - goto error; + return NULL; } if (seclabel->type =3D=3D VIR_DOMAIN_SECLABEL_NONE && seclabel->relabel) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("resource relabeling is not compatible with= 'none' label type")); - goto error; + return NULL; } /* For the model 'none' none of the following labels is going to be @@ -7857,7 +7857,7 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt, virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported type=3D'%s' to model 'none'"= ), virDomainSeclabelTypeToString(seclabel->typ= e)); - goto error; + return NULL; } /* combination of relabel=3D'yes' and type=3D'static' * is checked a few lines above. */ @@ -7876,7 +7876,7 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt, if (!seclabel->label) { virReportError(VIR_ERR_XML_ERROR, "%s", _("security label is missing")); - goto error; + return NULL; } } @@ -7889,7 +7889,7 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt, if (!seclabel->imagelabel) { virReportError(VIR_ERR_XML_ERROR, "%s", _("security imagelabel is missing")); - goto error; + return NULL; } } @@ -7900,9 +7900,6 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt, } return g_steal_pointer(&seclabel); - - error: - return NULL; } static int --=20 2.31.1