From nobody Sun Feb 8 16:24:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1578347915; cv=none; d=zohomail.com; s=zohoarc; b=aZZy66jvFREosK3AZmy6n4FdIDZWXTGKySulnK/O8n74ddHnSmo9WOtyYrrSGGXNTe551LnbmcW1ZkubM+8vebxyzEIpKnkmTxn0A1CBPvz9djbulaTrgT9v4CVddWzmMg0hfUjOIPSf2vtX/25PlbdZUoCcyesmFZWOBPEHrUY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578347915; 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; bh=46FBae7tPEfjig7y/RjMbiL2aADmUr+bFIXeJfEmjiI=; b=IMsHAy3DqBTRAI4CzLACyT3D8n/8dra09dVCaiCj8ubcdSr9MiykliiOVk7d0n8qqBcqx8C+0uX2vSMsdczZdQLtagO/+EGZJYw8hWeRscjkU0OgN8hUTbQSIi3s7nbGwpDMfH9CU+5mqTG2xmql6X0E6//lP8KRkSh8FqTxjvI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1578347915927289.42192054892087; Mon, 6 Jan 2020 13:58:35 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-245-lK5Mw_QcMCqV2eXr5FTUtw-1; Mon, 06 Jan 2020 16:58:33 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 78A8FDBE5; Mon, 6 Jan 2020 21:58:27 +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 553CA5C1B2; Mon, 6 Jan 2020 21:58:27 +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 1667181C66; Mon, 6 Jan 2020 21:58:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 006Lw7QT007178 for ; Mon, 6 Jan 2020 16:58:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id D2E69101B568; Mon, 6 Jan 2020 21:58:07 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD9E0101B565 for ; Mon, 6 Jan 2020 21:58:05 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 57C088119DB for ; Mon, 6 Jan 2020 21:58:05 +0000 (UTC) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-Q8rotzk1MvSLxBkaeuuBfQ-1; Mon, 06 Jan 2020 16:58:03 -0500 Received: by mail-qt1-f176.google.com with SMTP id g1so3352472qtr.13 for ; Mon, 06 Jan 2020 13:58:03 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:655b:9e1c:e865:3705:e1df]) by smtp.gmail.com with ESMTPSA id x34sm23898440qtd.20.2020.01.06.13.58.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2020 13:58:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578347914; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=46FBae7tPEfjig7y/RjMbiL2aADmUr+bFIXeJfEmjiI=; b=JSElM2NxcvjmtHi65opkp5MKQBiG+vDIOLrS8BRybVuWs8bMT/rohTtlWuIifvX85rciVl LM3OMMmPYhzJDCq1exhqnWmy9rguTgQa+kpZKyn6OT/qIa/y2cFzaqjSUGv8od1WruNpGD Tw57axV0wbDKEM9WvKSZAGDVWNheG3E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bc+uiyC9SzaBUsf38zuR/KerVHLEg1uAPc37/tcytwc=; b=MVoWCaCb+IqlId/VlcpDwaSHWV9R6ESflUhIzhLI9MuBk1Ok5hj/H8QT3JbaSIHtqk 0ohpsaxX/fZ+/jBIfPPEN7d5oLppvMzf61A+mYHi3gOaCF+ooRyxCrnMMk3QcoXPkVYn AxPDE18mM3kU3F3tJWPh/3s0HFGgdlAG30YS1mGmd0x5YCkjdchQJF8wAfZvagfp90bl NuyM6PRuOoRrMticZ8tOSNeEDg1VxAjDVRhIjfO/70IV6QWZeCy2XBXff6220mxcweE4 Ve4YsyUfjGMDS6LYMl8c/4xevL+SWmcoy/mxSlPthhZy45YVO/eFA4EX0SfXY6f8OW+Y N5+g== X-Gm-Message-State: APjAAAVGUcGhPuCElOVpGztsrbQdPINmTlJpd8ZluGHxXxbpc+e9/87n 0UvscJpCPN5iEuc7bQhSxSpsnefO X-Google-Smtp-Source: APXvYqwI90b5ai57wE7McbZwDCva2GsZmgJbgmBQuJdOPbQDMs5p6yJcCjxQqT493cHRrBBIGIT/GQ== X-Received: by 2002:ac8:1184:: with SMTP id d4mr77514243qtj.104.1578347882478; Mon, 06 Jan 2020 13:58:02 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 6 Jan 2020 18:57:27 -0300 Message-Id: <20200106215750.361615-4-danielhb413@gmail.com> In-Reply-To: <20200106215750.361615-1-danielhb413@gmail.com> References: <20200106215750.361615-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: Q8rotzk1MvSLxBkaeuuBfQ-1 X-MC-Unique: lK5Mw_QcMCqV2eXr5FTUtw-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 006Lw7QT007178 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v1 03/26] conf: remove more unneeded labels 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.16 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Remove unneeded labels from the following conf files: cpu_conf.c domain_addr.c interface_conf.c nwfilter_params.c Signed-off-by: Daniel Henrique Barboza --- src/conf/cpu_conf.c | 36 ++++++++++++++++-------------------- src/conf/domain_addr.c | 9 ++++----- src/conf/interface_conf.c | 9 +++------ src/conf/nwfilter_params.c | 5 +---- 4 files changed, 24 insertions(+), 35 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 7490d6bf73..b463981de0 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -992,7 +992,6 @@ virCPUDefIsEqual(virCPUDefPtr src, virCPUDefPtr dst, bool reportError) { - bool identical =3D false; size_t i; =20 if (!src && !dst) @@ -1004,91 +1003,91 @@ virCPUDefIsEqual(virCPUDefPtr src, =20 if ((src && !dst) || (!src && dst)) { MISMATCH("%s", _("Target CPU does not match source")); - goto cleanup; + return false; } =20 if (src->type !=3D dst->type) { MISMATCH(_("Target CPU type %s does not match source %s"), virCPUTypeToString(dst->type), virCPUTypeToString(src->type)); - goto cleanup; + return false; } =20 if (src->mode !=3D dst->mode) { MISMATCH(_("Target CPU mode %s does not match source %s"), virCPUModeTypeToString(dst->mode), virCPUModeTypeToString(src->mode)); - goto cleanup; + return false; } =20 if (src->check !=3D dst->check) { MISMATCH(_("Target CPU check %s does not match source %s"), virCPUCheckTypeToString(dst->check), virCPUCheckTypeToString(src->check)); - goto cleanup; + return false; } =20 if (src->arch !=3D dst->arch) { MISMATCH(_("Target CPU arch %s does not match source %s"), virArchToString(dst->arch), virArchToString(src->arch)); - goto cleanup; + return false; } =20 if (STRNEQ_NULLABLE(src->model, dst->model)) { MISMATCH(_("Target CPU model %s does not match source %s"), NULLSTR(dst->model), NULLSTR(src->model)); - goto cleanup; + return false; } =20 if (STRNEQ_NULLABLE(src->vendor, dst->vendor)) { MISMATCH(_("Target CPU vendor %s does not match source %s"), NULLSTR(dst->vendor), NULLSTR(src->vendor)); - goto cleanup; + return false; } =20 if (STRNEQ_NULLABLE(src->vendor_id, dst->vendor_id)) { MISMATCH(_("Target CPU vendor id %s does not match source %s"), NULLSTR(dst->vendor_id), NULLSTR(src->vendor_id)); - goto cleanup; + return false; } =20 if (src->sockets !=3D dst->sockets) { MISMATCH(_("Target CPU sockets %d does not match source %d"), dst->sockets, src->sockets); - goto cleanup; + return false; } =20 if (src->cores !=3D dst->cores) { MISMATCH(_("Target CPU cores %d does not match source %d"), dst->cores, src->cores); - goto cleanup; + return false; } =20 if (src->threads !=3D dst->threads) { MISMATCH(_("Target CPU threads %d does not match source %d"), dst->threads, src->threads); - goto cleanup; + return false; } =20 if (src->nfeatures !=3D dst->nfeatures) { MISMATCH(_("Target CPU feature count %zu does not match source %zu= "), dst->nfeatures, src->nfeatures); - goto cleanup; + return false; } =20 for (i =3D 0; i < src->nfeatures; i++) { if (STRNEQ(src->features[i].name, dst->features[i].name)) { MISMATCH(_("Target CPU feature %s does not match source %s"), dst->features[i].name, src->features[i].name); - goto cleanup; + return false; } =20 if (src->features[i].policy !=3D dst->features[i].policy) { MISMATCH(_("Target CPU feature policy %s does not match source= %s"), virCPUFeaturePolicyTypeToString(dst->features[i].poli= cy), virCPUFeaturePolicyTypeToString(src->features[i].poli= cy)); - goto cleanup; + return false; } } =20 @@ -1098,15 +1097,12 @@ virCPUDefIsEqual(virCPUDefPtr src, (src->cache->level !=3D dst->cache->level || src->cache->mode !=3D dst->cache->mode))) { MISMATCH("%s", _("Target CPU cache does not match source")); - goto cleanup; + return false; } =20 #undef MISMATCH =20 - identical =3D true; - - cleanup: - return identical; + return true; } =20 =20 diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 165bd70f2b..ef7ee80e6a 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -1175,7 +1175,7 @@ virDomainPCIAddressGetNextAddr(virDomainPCIAddressSet= Ptr addrs, =20 if (addrs->nbuses =3D=3D 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("No PCI buses available"= )); - goto error; + return -1; } =20 /* if the caller asks for "any function", give them function 0 */ @@ -1199,7 +1199,7 @@ virDomainPCIAddressGetNextAddr(virDomainPCIAddressSet= Ptr addrs, =20 if (virDomainPCIAddressFindUnusedFunctionOnBus(bus, &a, function, flags, &found) < 0)= { - goto error; + return -1; } =20 if (found) @@ -1223,7 +1223,7 @@ virDomainPCIAddressGetNextAddr(virDomainPCIAddressSet= Ptr addrs, =20 if (virDomainPCIAddressFindUnusedFunctionOnBus(bus, &a, function, flags, &found) < 0)= { - goto error; + return -1; } =20 /* The isolation group for the bus will actually be changed @@ -1236,7 +1236,7 @@ virDomainPCIAddressGetNextAddr(virDomainPCIAddressSet= Ptr addrs, if (addrs->dryRun) { /* a is already set to the first new bus */ if (virDomainPCIAddressSetGrow(addrs, &a, flags) < 0) - goto error; + return -1; /* this device will use the first slot of the new bus */ a.slot =3D addrs->buses[a.bus].minSlot; goto success; @@ -1244,7 +1244,6 @@ virDomainPCIAddressGetNextAddr(virDomainPCIAddressSet= Ptr addrs, =20 virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("No more available PCI slots")); - error: return -1; =20 success: diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index fbfd855395..7a41b19ed0 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -1070,19 +1070,19 @@ virInterfaceDefDevFormat(virBufferPtr buf, if (def =3D=3D NULL) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("virInterfaceDefFormat NULL def")); - goto cleanup; + return -1; } =20 if ((def->name =3D=3D NULL) && (def->type !=3D VIR_INTERFACE_TYPE_VLAN= )) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("virInterfaceDefFormat missing interface na= me")); - goto cleanup; + return -1; } =20 if (!(type =3D virInterfaceTypeToString(def->type))) { virReportError(VIR_ERR_INTERNAL_ERROR, _("unexpected interface type %d"), def->type); - goto cleanup; + return -1; } =20 virBufferAsprintf(buf, "\n"); =20 return 0; - - cleanup: - return -1; } =20 =20 diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c index 4110169135..b0d60abdd0 100644 --- a/src/conf/nwfilter_params.c +++ b/src/conf/nwfilter_params.c @@ -672,12 +672,9 @@ virNWFilterHashTablePutAll(virHashTablePtr src, =20 virHashForEach(src, addToTable, &atts); if (atts.errOccurred) - goto err_exit; + return -1; =20 return 0; - - err_exit: - return -1; } =20 /* The general purpose function virNWFilterVarValueEqual returns a --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list