From nobody Mon Feb 9 21:20:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1593056243; cv=none; d=zohomail.com; s=zohoarc; b=jqRrPnhllF9YH1Xgw2/wZGmnb1qg+V2Ae8xvTDExaB8DWGgVuMj56heHviymDsAmGHflKbOWwVZ34HygRl7SwPAkFkpD5XaZ4Z/cV7iTDV36eYgQf/D7v6Wq+AKZfnN+j0slnzxuE5eTvo4LCiYlwnngBj2YAXJ8lGMFh2fxC2A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593056243; 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=PqWPRAUaxCij3uQb1cfcZLHklGnO0b5nCeJW3zYFPNE=; b=Ft5ZA0zu9X2YcLMU7DG//Ma8/NhaawsPiAZXOTLVGEsLHiBuFbo3+jKY2hH9cDH/aO8z7Ko4PqY1j/02bW6mjqzqyYUqra2ACy3d29QDfQCyJ7Lovx/cdYuySFf54YB3LOQhkgUfTdaV3i6FAImWgPSWbjHPqiqSk1WqaL/ox+A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1593056243987901.2977188698852; Wed, 24 Jun 2020 20:37:23 -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-14-57HIiuNdPGSjSg2HO5XHoQ-1; Wed, 24 Jun 2020 23:34:43 -0400 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 B311BEC1A3; Thu, 25 Jun 2020 03:34:36 +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 95AC05C557; Thu, 25 Jun 2020 03:34:36 +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 693BE87581; Thu, 25 Jun 2020 03:34:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05P3YTR7007872 for ; Wed, 24 Jun 2020 23:34:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 482B85BAC0; Thu, 25 Jun 2020 03:34:29 +0000 (UTC) Received: from vhost2.laine.org (ovpn-114-28.phx2.redhat.com [10.3.114.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0554B5BAC6 for ; Thu, 25 Jun 2020 03:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593056242; 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=PqWPRAUaxCij3uQb1cfcZLHklGnO0b5nCeJW3zYFPNE=; b=FVrmYmsMlxrSjw4N3hIFeG5MjUvb+Xv/zaAykYR9l0NVe0FPnAQzC0nP59rfmafWlkT4SP nu7mHbvsi3YgluGagrEzQ/AJhvVRTdiw0h8eqrXr1we5HI1/AqqH1a+TJq9qTW40Fq8GJL 5CIBEn5NTJ9RnyigBjZIJqZH147R5Ns= X-MC-Unique: 57HIiuNdPGSjSg2HO5XHoQ-1 From: Laine Stump To: libvir-list@redhat.com Subject: [PATCH 16/25] squash into 'network: convert local pointers to g_auto*' Date: Wed, 24 Jun 2020 23:34:05 -0400 Message-Id: <20200625033414.1819594-17-laine@redhat.com> In-Reply-To: <20200625033414.1819594-1-laine@redhat.com> References: <20200625033414.1819594-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.16 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) Content-Type: text/plain; charset="utf-8" Signed-off-by: Laine Stump --- src/network/bridge_driver_linux.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/network/bridge_driver_linux.c b/src/network/bridge_driver_= linux.c index 0d0ac730f2..7f765bcf99 100644 --- a/src/network/bridge_driver_linux.c +++ b/src/network/bridge_driver_linux.c @@ -834,7 +834,7 @@ int networkAddFirewallRules(virNetworkDefPtr def) { size_t i; virNetworkIPDefPtr ipdef; - g_autoptr(virFirewall) fw =3D NULL; + g_autoptr(virFirewall) fw =3D virFirewallNew(); =20 if (virOnce(&createdOnce, networkSetupPrivateChains) < 0) return -1; @@ -920,8 +920,6 @@ int networkAddFirewallRules(virNetworkDefPtr def) } } =20 - fw =3D virFirewallNew(); - virFirewallStartTransaction(fw, 0); =20 networkAddGeneralFirewallRules(fw, def); @@ -946,10 +944,7 @@ int networkAddFirewallRules(virNetworkDefPtr def) virFirewallStartTransaction(fw, VIR_FIREWALL_TRANSACTION_IGNORE_ERRORS= ); networkAddChecksumFirewallRules(fw, def); =20 - if (virFirewallApply(fw) < 0) - return -1; - - return 0; + return virFirewallApply(fw); } =20 /* Remove all rules for all ip addresses (and general rules) on a network = */ --=20 2.25.4