From nobody Sun Feb 8 03:58:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1599078387; cv=none; d=zohomail.com; s=zohoarc; b=ZtoFvrGaVnt8j/jKHKi1oH+m+bZoq2hbViO7rqlzM2WsMd01fDk856LF94IYVv3Y1lEUqsE1QipFs55pXN19wTGa30DBLWntC59KDwwyvfDNlnXoGymFK/UlBg7/woECOPosbN2r02+b7DKKN2HHfJOFZgFLr1xq6hjttBF5QNE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599078387; 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=qDKBBf4OfImhT5ZYgYl3xDjCnBwqQPy2IOcwXA35igs=; b=CM4AjxpaLWjMvOQYEh2zkE5KtzACAZq7+dPy24UHQ0cMG0CHPIVm3nH/rLYkemNTHljBQFMAs3wtyL7cce6j19tn28FPFSQV6ebTeNdLEyAvLHwGgo2tQZjwKTBmk9ttpZbehC+uCO1H2MKR6rqfDyy9EhXlck6pv6EVo3tOUWE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1599078387042712.7774491009407; Wed, 2 Sep 2020 13:26:27 -0700 (PDT) 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-389-NQ7l2_UiN1y_h-emZFYDxw-1; Wed, 02 Sep 2020 16:26:24 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B13DF80EFA4; Wed, 2 Sep 2020 20:26:18 +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 8DE797E30E; Wed, 2 Sep 2020 20:26:18 +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 5882E183D026; Wed, 2 Sep 2020 20:26:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 082KQ5Ux002788 for ; Wed, 2 Sep 2020 16:26:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 884532157F24; Wed, 2 Sep 2020 20:26:05 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 815C42157F26 for ; Wed, 2 Sep 2020 20:26:03 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (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 E1572102F1E3 for ; Wed, 2 Sep 2020 20:26:02 +0000 (UTC) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-152-Qyvb1HLrMTOjojxOgCtnJg-1; Wed, 02 Sep 2020 16:26:00 -0400 Received: by mail-qk1-f195.google.com with SMTP id d20so1015137qka.5 for ; Wed, 02 Sep 2020 13:26:00 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:d5bb:61e:5265:e62b:1233]) by smtp.gmail.com with ESMTPSA id b187sm547176qkd.107.2020.09.02.13.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 13:25:59 -0700 (PDT) X-MC-Unique: NQ7l2_UiN1y_h-emZFYDxw-1 X-MC-Unique: Qyvb1HLrMTOjojxOgCtnJg-1 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=qDKBBf4OfImhT5ZYgYl3xDjCnBwqQPy2IOcwXA35igs=; b=CeAvKGBK5SkL6KbRsA3KkmIOVj9uJBjT6i0axWg41bW9PtjIbvgSmnPx+7TpSAwBt6 oMr381B/yYof2ZZHQMHznrkU46QLj7MHzEQugim5/Ry37/gLPcWSteIExfoOnA8zwwh7 BMlrffs8KPVtMQkmz7RVFTu7SKcEBNBW2GOKuY7K6FvFuykureOxquY0HH8ie7jcmSJO L15MVY99mcUJAvB/LgxeGFkvcYjbX60k79RLjiCiEzxo9tTFRb3BtrdN3fJ3EO8GOjby /TkshrQsVgreVLVEPUnsdV0BIZAaLgOw24sJFgeF+HcNGfi4PswtNHuh8aL1JLyZFCAJ vyjA== X-Gm-Message-State: AOAM531jTRlU2umwevBkEwmLesL8xadGutNIBKs96gzxlTBXO3hNmBE+ r8p4GWHayNDJFye8Ugb3K8z/DPl1mY2FVg== X-Google-Smtp-Source: ABdhPJyF+SopmQ2z7GlcOMRDj028msRgbaV31erb0lLh2h2hB5zDaqBTLmQF7wM8EfLs/e3IX0YPmQ== X-Received: by 2002:ae9:dc03:: with SMTP id q3mr8712206qkf.276.1599078359943; Wed, 02 Sep 2020 13:25:59 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH 03/12] cpu_ppc64.c: modernize ppc64VendorParse() Date: Wed, 2 Sep 2020 17:25:37 -0300 Message-Id: <20200902202546.483726-4-danielhb413@gmail.com> In-Reply-To: <20200902202546.483726-1-danielhb413@gmail.com> References: <20200902202546.483726-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza 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.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use g_autoptr() in virCPUppc64VendorPtr and remove the now uneeded 'cleanup' label. Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- src/cpu/cpu_ppc64.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index b003e48bed..6c73145f06 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -279,8 +279,7 @@ ppc64VendorParse(xmlXPathContextPtr ctxt G_GNUC_UNUSED, void *data) { struct ppc64_map *map =3D data; - virCPUppc64VendorPtr vendor; - int ret =3D -1; + g_autoptr(virCPUppc64Vendor) vendor =3D NULL; =20 if (VIR_ALLOC(vendor) < 0) return -1; @@ -290,17 +289,13 @@ ppc64VendorParse(xmlXPathContextPtr ctxt G_GNUC_UNUSE= D, if (ppc64VendorFind(map, vendor->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("CPU vendor %s already defined"), vendor->name); - goto cleanup; + return -1; } =20 if (VIR_APPEND_ELEMENT(map->vendors, map->nvendors, vendor) < 0) - goto cleanup; - - ret =3D 0; + return -1; =20 - cleanup: - ppc64VendorFree(vendor); - return ret; + return 0; } =20 =20 --=20 2.26.2