From nobody Fri May 3 14:59:26 2024 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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=1626187566; cv=none; d=zohomail.com; s=zohoarc; b=L6GBEpO21RmLuNxrJbgAJKcYEG8xEw4CY9O9nN73PReifUNkCVT/G440icAnVRkffyAG0lmO1WHgznfZ7WlVe53Ty6cBohj839eTG4kaEaquoAygRzNekkNUDEJmgDijSA0UFM6WMVLeLIMLHCIXJfrfSw6bolVY5s3PilpY3kw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626187566; 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=WCglIpCs4CgRFAa/ARvvUJSMRi4Z5zjwFftgJsnb4xw=; b=lI25kVRpeDZ3MkRrkAa+KPZ8vkPwMMXarTcc9nVlBwODjH2ya8mYKms9KJO51hme3pt8FU3c/uotgQjuNQ2ZeElo0l1dcaBJIG68/zcQvVG50f2I/HtftNUZmr571p8KIACz/uWLk8U73Ud367rU83GC4QfiK9nD63H+gM5zgv0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1626187566509744.2009976964453; Tue, 13 Jul 2021 07:46:06 -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-155-BI8UcyWGPdCUUI8OaQK4-w-1; Tue, 13 Jul 2021 10:45:15 -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 3909B1940926; Tue, 13 Jul 2021 14:45:09 +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 16CD35C1C5; Tue, 13 Jul 2021 14:45:09 +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 D1A9B1809CB6; Tue, 13 Jul 2021 14:45:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16DEilnk031952 for ; Tue, 13 Jul 2021 10:44:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id A28471042A51; Tue, 13 Jul 2021 14:44:47 +0000 (UTC) Received: from work.redhat.com (ovpn-113-139.ams2.redhat.com [10.36.113.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id ECD8D1042A50; Tue, 13 Jul 2021 14:44:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626187565; 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=WCglIpCs4CgRFAa/ARvvUJSMRi4Z5zjwFftgJsnb4xw=; b=iQ1VAV+zxYg9cOQcaYjTNyru2XCYeDt0tJZyfIAU7ON2i9rAiZ0O8HlcfclZVMZUj/Y2Cm 7n1+ar5N82VkjsIrOnZKSQbpM2+A0LdGyWKnc52zc+VShNBXL+SnrZdVzOmICYBffH7veT JIYjmmhzZLL9gStp8hAmX34q1lJPNEY= X-MC-Unique: BI8UcyWGPdCUUI8OaQK4-w-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 01/10] conf: Add AUTOPTR_CLEANUP_FUNC for virNWFilterBindingDef Date: Tue, 13 Jul 2021 16:44:32 +0200 Message-Id: <20210713144441.60635-2-twiederh@redhat.com> In-Reply-To: <20210713144441.60635-1-twiederh@redhat.com> References: <20210713144441.60635-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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) X-ZM-MESSAGEID: 1626187568634100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virnwfilterbindingdef.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/virnwfilterbindingdef.h b/src/conf/virnwfilterbinding= def.h index 0e52789332..68d531b75d 100644 --- a/src/conf/virnwfilterbindingdef.h +++ b/src/conf/virnwfilterbindingdef.h @@ -41,6 +41,8 @@ struct _virNWFilterBindingDef { =20 void virNWFilterBindingDefFree(virNWFilterBindingDef *binding); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNWFilterBindingDef, virNWFilterBindingDef= Free); + virNWFilterBindingDef * virNWFilterBindingDefCopy(virNWFilterBindingDef *src); =20 --=20 2.31.1 From nobody Fri May 3 14:59:26 2024 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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=1626187520; cv=none; d=zohomail.com; s=zohoarc; b=HV3yejNa3KVImY4UlVz2L2cBVeG1/PCFUgjRKKeuQktIq1OjMV8ZtXwT2SFR5EbYVI2x17FPwPqKYa1mbkB5RTPmR3OSk/bTEacWcvabYiPbmtz059/VOObpJNUIpAFkmApI3vpJZvUy1qZ+h72PuKmbMIVK3IzFuGsgPfAu2tQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626187520; 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=gwpYWy0XdiFAUD7WMJn5LFjus4PMEW3/ir6X8tXTH8A=; b=GBmWs6PwVzv2JtxSKWHT4850FfSKJbZ6MPHW5/eRM0ntobcAlfmxz+Fm+9Z2l4u4rT5+y/I8GrUUBZkFGdZbmHnkpqwiimGF0l/jTNz0crOCvndHkeNdcVlBkYaTP/4KdzkBojBZ8oxpKBd5FUqlpgoOl1qCatm2zUK5wrJvqN8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 16261875208571.157789145017432; Tue, 13 Jul 2021 07:45:20 -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-39-QO9NG3hlNfOk-EHb4jgojg-1; Tue, 13 Jul 2021 10:45:18 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 958CA100C667; Tue, 13 Jul 2021 14:45:12 +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 67C2019D9B; Tue, 13 Jul 2021 14:45:12 +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 28AA51800C8D; Tue, 13 Jul 2021 14:45:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16DEimxU031962 for ; Tue, 13 Jul 2021 10:44:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id AB4E11042A50; Tue, 13 Jul 2021 14:44:48 +0000 (UTC) Received: from work.redhat.com (ovpn-113-139.ams2.redhat.com [10.36.113.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0177A101E24F; Tue, 13 Jul 2021 14:44:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626187519; 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=gwpYWy0XdiFAUD7WMJn5LFjus4PMEW3/ir6X8tXTH8A=; b=cVt26odNnM84eMQ5tTLSa3KZZXngEEXJMzF5FBOyPWuoJ76LNrywTNESlLAeHdgQGtUsds A/kBKERCMvuhNT+DbhMR0q/ZHzQxRSnEcHVwNDGFh9hgIDG9YOXWsTIYXoJZk44xgF10uO AgeTr+mNGwqxXKzpFN/LwJA+3HPAjgM= X-MC-Unique: QO9NG3hlNfOk-EHb4jgojg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 02/10] virNWFilterBindingDefCopy: `virHashNew` cannot return NULL Date: Tue, 13 Jul 2021 16:44:33 +0200 Message-Id: <20210713144441.60635-3-twiederh@redhat.com> In-Reply-To: <20210713144441.60635-1-twiederh@redhat.com> References: <20210713144441.60635-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.84 on 10.5.11.23 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: 1626187522408100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virnwfilterbindingdef.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/virnwfilterbindingdef.c b/src/conf/virnwfilterbinding= def.c index 98df1f750a..9704e1bebb 100644 --- a/src/conf/virnwfilterbindingdef.c +++ b/src/conf/virnwfilterbindingdef.c @@ -65,8 +65,7 @@ virNWFilterBindingDefCopy(virNWFilterBindingDef *src) =20 ret->filter =3D g_strdup(src->filter); =20 - if (!(ret->filterparams =3D virHashNew(virNWFilterVarValueHashFree))) - goto error; + ret->filterparams =3D virHashNew(virNWFilterVarValueHashFree); =20 if (virNWFilterHashTablePutAll(src->filterparams, ret->filterparams) <= 0) goto error; --=20 2.31.1 From nobody Fri May 3 14:59:26 2024 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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=1626187510; cv=none; d=zohomail.com; s=zohoarc; b=DDKdZ0zx+iTsidgLFm6QmU/nT7HNM6/YkXOupzgLxLx8PdeObEHqQRAmnZsW7L2Kd62dKDywMsFinoav1DBuz2RT726m9UIRFsSsCfSfF7eBlljTAxTyl2B7Gmqfn5nuEFUR/SDLgFGyfTve7ucSWuNUfpZFhRgRkSCiTsuOWos= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626187510; 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=0061CbaN7cUE1lJ75cJoPSy1X/MPX8paIiawDB0sRSM=; b=Pu4Urq3Nn0whXww4B1n0JiD05kIR/JVE7ubIc8nqQDfRkbz0xiLTvOpEUMuiQ2CRATO/FWTnBodjegs4CNoWuDcpYWuWt4JIQ6vuGLYjDi/qlz60ObEkV3Z3BrxcAWsaUWyGS71m5J0oBQgM9rg4nPnPb/WySjwAoRjLaGKLtWk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1626187510609238.33117148667554; Tue, 13 Jul 2021 07:45:10 -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-481-KmGW8tcLNGaCNgJgfSBo4w-1; Tue, 13 Jul 2021 10:45:08 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC940804142; Tue, 13 Jul 2021 14:44:58 +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 AB09060C05; Tue, 13 Jul 2021 14:44:58 +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 607984EA2A; Tue, 13 Jul 2021 14:44:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16DEinGM031973 for ; Tue, 13 Jul 2021 10:44:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id B4B951042A51; Tue, 13 Jul 2021 14:44:49 +0000 (UTC) Received: from work.redhat.com (ovpn-113-139.ams2.redhat.com [10.36.113.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AA7A101E24F; Tue, 13 Jul 2021 14:44:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626187509; 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=0061CbaN7cUE1lJ75cJoPSy1X/MPX8paIiawDB0sRSM=; b=a4agQaked2dIBF/Q4tPKP/bd7jSqvFg6vhLcrhtKbzmIX+ALlCbanTJdVP5Bx6kR6rpl4F wJHyHs1BWTbH25RBOD11mDMDfkZ1pc9H3Cf4DxRw5eoMlU5K4T6BxqdBsfBS5V0yN2ex5f J6HsdSOAo4DbYlu0WEQU9SSJrAcalSs= X-MC-Unique: KmGW8tcLNGaCNgJgfSBo4w-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 03/10] virNWFilterBindingDefCopy: Use automatic memory management Date: Tue, 13 Jul 2021 16:44:34 +0200 Message-Id: <20210713144441.60635-4-twiederh@redhat.com> In-Reply-To: <20210713144441.60635-1-twiederh@redhat.com> References: <20210713144441.60635-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.12 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: 1626187510997100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virnwfilterbindingdef.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/conf/virnwfilterbindingdef.c b/src/conf/virnwfilterbinding= def.c index 9704e1bebb..4ed3763efd 100644 --- a/src/conf/virnwfilterbindingdef.c +++ b/src/conf/virnwfilterbindingdef.c @@ -49,9 +49,7 @@ virNWFilterBindingDefFree(virNWFilterBindingDef *def) virNWFilterBindingDef * virNWFilterBindingDefCopy(virNWFilterBindingDef *src) { - virNWFilterBindingDef *ret; - - ret =3D g_new0(virNWFilterBindingDef, 1); + g_autoptr(virNWFilterBindingDef) ret =3D g_new0(virNWFilterBindingDef,= 1); =20 ret->ownername =3D g_strdup(src->ownername); =20 @@ -70,10 +68,9 @@ virNWFilterBindingDefCopy(virNWFilterBindingDef *src) if (virNWFilterHashTablePutAll(src->filterparams, ret->filterparams) <= 0) goto error; =20 - return ret; + return g_steal_pointer(&ret); =20 error: - virNWFilterBindingDefFree(ret); return NULL; } =20 --=20 2.31.1 From nobody Fri May 3 14:59:26 2024 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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=1626187518; cv=none; d=zohomail.com; s=zohoarc; b=a6jLUWBSqysyzr+c2zC5xXj/u4OS2F2ZeuKdRXRS3Qhoi9qtlvi7WwiWOQoagyxv+eLD2zu5TyU66p9IhxKiZ/eObCLOOwgoYYZA4EXhQsO813lwm1dpceF4A3+C/KL5mkIBP2appP4Ak65yt+qMMlxUl0VoidVWOqXSONZiMRs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626187518; 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=EE2SY5xDwzg36YcIbAkifKhOXZtnIKGciA84bXG6hSg=; b=NHke3H7ySniP5sYu8uk32JqISi6tpzF86u1maL75eHXSuAHj6UXuvO+SBfjjnJbd8mNijljxgChEJ6KjP/4RKwjXqSTTXGT0PILaiBlVWlMkB7cnItCEPQmDrnL4myDvt2EXxem1H+pBMuyTMa2a3/8f1swV16cqC2hPw5FQG/4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1626187518242519.4913462779939; Tue, 13 Jul 2021 07:45:18 -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-105-wfRHb16SOpWxmLGFeb_7-w-1; Tue, 13 Jul 2021 10:45:14 -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 87F68CC621; Tue, 13 Jul 2021 14:45:08 +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 63AFF5C1C5; Tue, 13 Jul 2021 14:45:08 +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 04B494EA38; Tue, 13 Jul 2021 14:45:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16DEioWg031984 for ; Tue, 13 Jul 2021 10:44:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id BD8381042A50; Tue, 13 Jul 2021 14:44:50 +0000 (UTC) Received: from work.redhat.com (ovpn-113-139.ams2.redhat.com [10.36.113.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1391F101E24F; Tue, 13 Jul 2021 14:44:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626187516; 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=EE2SY5xDwzg36YcIbAkifKhOXZtnIKGciA84bXG6hSg=; b=EI9gQkV/aRA1zBhcE7a22aNqlRBU2sp/Vi6hiYO2Vtq/0u1jOz9zCPWyCEAeoUk8eCaedW 4KiAN2mIDt6QixZImri6fmTbN3L+fKl5GFuoYoLU27SVxbUGtYS2BF41yN3958VLR7ok+1 kW457SsTNpn2lakRi1iMoYOob4uLB0Y= X-MC-Unique: wfRHb16SOpWxmLGFeb_7-w-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 04/10] virNWFilterBindingDefCopy: Remove superfluous `goto`s Date: Tue, 13 Jul 2021 16:44:35 +0200 Message-Id: <20210713144441.60635-5-twiederh@redhat.com> In-Reply-To: <20210713144441.60635-1-twiederh@redhat.com> References: <20210713144441.60635-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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) X-ZM-MESSAGEID: 1626187521817100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virnwfilterbindingdef.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/virnwfilterbindingdef.c b/src/conf/virnwfilterbinding= def.c index 4ed3763efd..22ecf7b828 100644 --- a/src/conf/virnwfilterbindingdef.c +++ b/src/conf/virnwfilterbindingdef.c @@ -66,12 +66,9 @@ virNWFilterBindingDefCopy(virNWFilterBindingDef *src) ret->filterparams =3D virHashNew(virNWFilterVarValueHashFree); =20 if (virNWFilterHashTablePutAll(src->filterparams, ret->filterparams) <= 0) - goto error; + return NULL; =20 return g_steal_pointer(&ret); - - error: - return NULL; } =20 =20 --=20 2.31.1 From nobody Fri May 3 14:59:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1626187566; cv=none; d=zohomail.com; s=zohoarc; b=h5XDEW2YGBYTu3Tigj34Qv6RkxjRZgLZvH/dx1q4IZf9DVJBlMSv/O+G7kGtehFPLVFfDvGZZEVVmU7wIJiTdxYEZyjIuXAprBk3VZg4CoSWQTfJH6GZktTDZLkbwLRU00xbQjQYujyf5QuQL9BNdfYp22aC2LYggAsOb+8o7co= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626187566; 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=MZorahAULtVnm1nITEjlKgdIz+rDnO2k+WizfZ9wbtg=; b=kgu6ZRxmHci7Nz0SrMmGh+bBZfn7No+v6bK3O7oUKBkN0jCrbjc2KSbZRci6X/d3xDiea8wFptiO2wl8g6nocttzhQHFWWyCby0E+ZTs+A7I8WYSB1AJGhuqnsBNbEl1VMIik5ARaBGEguttoSd0jU53KjH/2TLXazuBABukuv0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1626187566374631.1832362733734; Tue, 13 Jul 2021 07:46:06 -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-13-vtidRmWiMmqcn-u_3XQ5Qw-1; Tue, 13 Jul 2021 10:45:23 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DF3428BDEB8; Tue, 13 Jul 2021 14:45:15 +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 AF36319C45; Tue, 13 Jul 2021 14:45:15 +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 7BC34180101E; Tue, 13 Jul 2021 14:45:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16DEipAI031993 for ; Tue, 13 Jul 2021 10:44:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id C90D11042A51; Tue, 13 Jul 2021 14:44:51 +0000 (UTC) Received: from work.redhat.com (ovpn-113-139.ams2.redhat.com [10.36.113.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1DA9B101E24F; Tue, 13 Jul 2021 14:44:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626187565; 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=MZorahAULtVnm1nITEjlKgdIz+rDnO2k+WizfZ9wbtg=; b=gX0d7ZK9EZqOuW90T6cgkIdMc04AlWXep2EkweLSOgDzeExXAiCYtpsDpm1JMm5q/zNvOY Fk5kr+XzRJc3uEisW4mFBKYujYCyVurv9SBL4hicW9eu3YBoXq+tsNBFeBUdDsA9hjf+P1 1mXlmt+BUHB/UstuJvFI60LYkJVj7hY= X-MC-Unique: vtidRmWiMmqcn-u_3XQ5Qw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 05/10] virNWFilterBindingDefForNet: `virHashNew` cannot return NULL Date: Tue, 13 Jul 2021 16:44:36 +0200 Message-Id: <20210713144441.60635-6-twiederh@redhat.com> In-Reply-To: <20210713144441.60635-1-twiederh@redhat.com> References: <20210713144441.60635-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.84 on 10.5.11.23 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: 1626187568630100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/domain_nwfilter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/domain_nwfilter.c b/src/conf/domain_nwfilter.c index 1c62353fa1..5024d5fa03 100644 --- a/src/conf/domain_nwfilter.c +++ b/src/conf/domain_nwfilter.c @@ -59,8 +59,7 @@ virNWFilterBindingDefForNet(const char *vmname, =20 ret->filter =3D g_strdup(net->filter); =20 - if (!(ret->filterparams =3D virHashNew(virNWFilterVarValueHashFree))) - goto error; + ret->filterparams =3D virHashNew(virNWFilterVarValueHashFree); =20 if (net->filterparams && virNWFilterHashTablePutAll(net->filterparams, ret->filterparams) <= 0) --=20 2.31.1 From nobody Fri May 3 14:59:26 2024 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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=1626187509; cv=none; d=zohomail.com; s=zohoarc; b=ADavjgcGYmFA1KPHBP6BiN7r8awpLlpdOuqWPZq8Sv9fI6uHJLkk1b/nQPHJqwExHNX+5jsdX+PhT+v9dTrNoTMCTFYB6KZL26Npjv9wKjJ+PzU91j2i7cNil6Y10/vTtC+KYp3ANhWh/qcVbGlxTQ7Cjp/60WrlWih0Y1+RZG4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626187509; 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=JcTvFVsQSwMGO8WEw94BjhobQx6muEgSi1wTbeFSDfI=; b=VyTjjgGVcJ6VgMTQUl8XBOqps+mtMi2B36rWvzdtUAOjvZI+D/GKQwhIgrc8irUuXXeLHADAom8rrJvuFrKFZmt1vt24YItKctKM4z2Y9l4/E1rdeCC53cgrciyDEOkOU4kXhl/a9hiiyKnVtE4Lsexcti6nD2xq+cNtZUVN3eM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1626187509421467.6283860562771; Tue, 13 Jul 2021 07:45:09 -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-343-mwedFX6cN_6dgz7_79na3A-1; Tue, 13 Jul 2021 10:45:06 -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 5CCC1804143; Tue, 13 Jul 2021 14:44:57 +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 EB0A15C1C5; Tue, 13 Jul 2021 14:44:56 +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 75B8E1809CB3; Tue, 13 Jul 2021 14:44:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16DEiqI1031998 for ; Tue, 13 Jul 2021 10:44:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id D45AC1042A51; Tue, 13 Jul 2021 14:44:52 +0000 (UTC) Received: from work.redhat.com (ovpn-113-139.ams2.redhat.com [10.36.113.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 295C6101E24F; Tue, 13 Jul 2021 14:44:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626187508; 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=JcTvFVsQSwMGO8WEw94BjhobQx6muEgSi1wTbeFSDfI=; b=KiY9hX5QFmqEeAx3KYlWsRuK7GE5KbuUiSyG+IObj687feaHNsT6eCJWj6DO6BFukvLEmh glE1ue6PedsWnsRiJiogHryOp7nSFNVYxoZ3mBBW8mKzmbhxqS32GMWzpyPihWBgY6Hfeu HH1hDR0Kg9n0P/JJ5XFO4WN0xtPo/Rs= X-MC-Unique: mwedFX6cN_6dgz7_79na3A-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 06/10] virNWFilterBindingDefForNet: Use automatic memory management Date: Tue, 13 Jul 2021 16:44:37 +0200 Message-Id: <20210713144441.60635-7-twiederh@redhat.com> In-Reply-To: <20210713144441.60635-1-twiederh@redhat.com> References: <20210713144441.60635-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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) X-ZM-MESSAGEID: 1626187510756100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/domain_nwfilter.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_nwfilter.c b/src/conf/domain_nwfilter.c index 5024d5fa03..cb35221a59 100644 --- a/src/conf/domain_nwfilter.c +++ b/src/conf/domain_nwfilter.c @@ -42,9 +42,7 @@ virNWFilterBindingDefForNet(const char *vmname, const unsigned char *vmuuid, virDomainNetDef *net) { - virNWFilterBindingDef *ret; - - ret =3D g_new0(virNWFilterBindingDef, 1); + g_autoptr(virNWFilterBindingDef) ret =3D g_new0(virNWFilterBindingDef,= 1); =20 ret->ownername =3D g_strdup(vmname); =20 @@ -65,10 +63,9 @@ virNWFilterBindingDefForNet(const char *vmname, virNWFilterHashTablePutAll(net->filterparams, ret->filterparams) <= 0) goto error; =20 - return ret; + return g_steal_pointer(&ret); =20 error: - virNWFilterBindingDefFree(ret); return NULL; } =20 --=20 2.31.1 From nobody Fri May 3 14:59:26 2024 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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=1626187631; cv=none; d=zohomail.com; s=zohoarc; b=NB31iimhiblDrtm9XjwzNpUed6GxYl/hEHCXB+ZVAwnRl55ojG7F+uJ3ObYuiRTlVslEWsxLvSVaAu6JLibqpox5WjCzvaDBngymM8De1OM13cXGwQ0zB66FSOAZQgFJ7PEglQD/FKp7Si46fDgt4fuu0BwtfzWXFZ5sjXRE4xA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626187631; 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=VJhZP/uq4vE/danU6I53OcCzYCgwFnpN5EINSLLimgo=; b=fcElEmgT+73jePS5zlh/c+5gvA8Flp+2ONX4zbxMMp1ffazCht6sMjAZTXi6Glh4Ab87YnVoOn8ke3a3xDPvFx98yskm4PBfcRlPlQwGKRh1hsUaRYwnvjW3AMu3Ze2rFY/LDRLlNO+8L+sh1slnUV8oeTbDQeyzAPpYrL3XUiA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1626187631837612.9780276692729; Tue, 13 Jul 2021 07:47:11 -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-243-JthKz4rpO9y4UTcOi9qcag-1; Tue, 13 Jul 2021 10:45:18 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DE87F1023F40; Tue, 13 Jul 2021 14:45:11 +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 BF8D56091B; Tue, 13 Jul 2021 14:45:11 +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 87C231806D0F; Tue, 13 Jul 2021 14:45:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16DEir7J032013 for ; Tue, 13 Jul 2021 10:44:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id DBFD31042A52; Tue, 13 Jul 2021 14:44:53 +0000 (UTC) Received: from work.redhat.com (ovpn-113-139.ams2.redhat.com [10.36.113.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 31F7B101E24F; Tue, 13 Jul 2021 14:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626187630; 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=VJhZP/uq4vE/danU6I53OcCzYCgwFnpN5EINSLLimgo=; b=e1OnQAXr0u17p0d9OI6DIzIZOuOQqkcuP2sy24Y8VqXbR+LUmUtY4Xp7aI7iBGzsU5wXFu beCbivza3XAPgX0B9HVwWWxf2g8js1nUjbWccTgdU980GlKLwD5bwD6KC2vGUqSNSXxvjW kQTEz3WiQKVAyA0x3TvfZ0VxkhRamlM= X-MC-Unique: JthKz4rpO9y4UTcOi9qcag-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 07/10] virNWFilterBindingDefForNet: Remove superfluous `goto`s Date: Tue, 13 Jul 2021 16:44:38 +0200 Message-Id: <20210713144441.60635-8-twiederh@redhat.com> In-Reply-To: <20210713144441.60635-1-twiederh@redhat.com> References: <20210713144441.60635-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.13 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: 1626187633984100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/domain_nwfilter.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/domain_nwfilter.c b/src/conf/domain_nwfilter.c index cb35221a59..0a67b6765e 100644 --- a/src/conf/domain_nwfilter.c +++ b/src/conf/domain_nwfilter.c @@ -61,12 +61,9 @@ virNWFilterBindingDefForNet(const char *vmname, =20 if (net->filterparams && virNWFilterHashTablePutAll(net->filterparams, ret->filterparams) <= 0) - goto error; + return NULL; =20 return g_steal_pointer(&ret); - - error: - return NULL; } =20 =20 --=20 2.31.1 From nobody Fri May 3 14:59:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1626187527; cv=none; d=zohomail.com; s=zohoarc; b=bVk0ZZx77od7CG6BamWbWYflgeY5je2fka2pjOte9C8W0Y1SGCaVCOuSHkkBjrK6/ATC6yIAGp/s4YH+M0AqmTALs9rdJJ2Yh7osxgl5s5k9WBvHObTsw8IkchBWHIZk5zzCCqxwFF4Wk5qL7c6WorWZrkiGkj6ANM918g5pwqA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626187527; 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=lf7sI4DFcFp0O9J5/rpY2TUakOoq1FeMfRmjITzMI1I=; b=YJsidvEpWDPgfY9OmEBxr9NYTfQ2bGs5g9w5HzQY47PNi938zQxZEfz5gQ/bAuOsMrk88Pnu0SbtCohd0coV/Nc0Yp3WB93wtAhtGGjNGutBqcf3mzFmZCdwpu2jlrmfkC7Z/na92hZzVkTI/NPeHRGDFkH8H0RoFrA0vs0wmXg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1626187527889714.8355585781919; Tue, 13 Jul 2021 07:45: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-538-4iOvX7_fMqKuaoZRJy18-A-1; Tue, 13 Jul 2021 10:45:24 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1317D1940934; Tue, 13 Jul 2021 14:45:19 +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 DFB1819C44; Tue, 13 Jul 2021 14:45: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 A6A5C1800FDD; Tue, 13 Jul 2021 14:45:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16DEispl032023 for ; Tue, 13 Jul 2021 10:44:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id E62A6101E24F; Tue, 13 Jul 2021 14:44:54 +0000 (UTC) Received: from work.redhat.com (ovpn-113-139.ams2.redhat.com [10.36.113.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3CA881042A51; Tue, 13 Jul 2021 14:44:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626187525; 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=lf7sI4DFcFp0O9J5/rpY2TUakOoq1FeMfRmjITzMI1I=; b=O+TR3ygK87jx+TJ0d8goyDmihvstbP+LDA+7ff+Cg5oWTWgWPR0+fdJv20WQCPYhUtrpuK fYVYMkyYW022zUbiw5x3p0m0unMmLpY4sAAw2JluDI4ESpaLRVXf7wLuW3Bx/Ezt/UjwBY v0+Y4G8+toz6zT5hHFSnau4E9x9evts= X-MC-Unique: 4iOvX7_fMqKuaoZRJy18-A-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 08/10] virNWFilterBindingObjListNew: `virHashNew` cannot return NULL Date: Tue, 13 Jul 2021 16:44:39 +0200 Message-Id: <20210713144441.60635-9-twiederh@redhat.com> In-Reply-To: <20210713144441.60635-1-twiederh@redhat.com> References: <20210713144441.60635-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.84 on 10.5.11.23 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: 1626187529151100004 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/virnwfilterbindingobjlist.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/virnwfilterbindingobjlist.c b/src/conf/virnwfilterbin= dingobjlist.c index 1f19e27eb0..470a30ca90 100644 --- a/src/conf/virnwfilterbindingobjlist.c +++ b/src/conf/virnwfilterbindingobjlist.c @@ -66,10 +66,7 @@ virNWFilterBindingObjListNew(void) if (!(bindings =3D virObjectRWLockableNew(virNWFilterBindingObjListCla= ss))) return NULL; =20 - if (!(bindings->objs =3D virHashNew(virObjectFreeHashData))) { - virObjectUnref(bindings); - return NULL; - } + bindings->objs =3D virHashNew(virObjectFreeHashData); =20 return bindings; } --=20 2.31.1 From nobody Fri May 3 14:59:26 2024 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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=1626187524; cv=none; d=zohomail.com; s=zohoarc; b=TZHa7RgFEP2m8PK+XKO5ResRPiyHOnza5wNsug5+5zkKYuOf40Gm2Qumr5R4vOXLgceoUhBl+bhvbodgdwy0XM6UdhCtiV1Pk5se0cc3qYCD8lTpleahe/tEnWPjIf/4R/oWtDXpwY33XCZ1EiyGFeU/7wzC0YJrE6goc2szR1U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626187524; 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=ePD7QgoRjNZKGqvty1CCh5bX+wq2uAW7gCQLWD4Z/Rs=; b=QAVT2aqBAEI8VO6iswZ6S+oFuu+ogW/0v2r4V7bZpIpdyIQdB74WyR3xigAUVE0DJgmpgPZhck76Rlh3is/SQGtwxD7eoGE1VExhRyubIF4nN6LbYgAS+4Lsc3EyGSHX/fVi0YVCWCc3UH/XDba+bMsPELjLquTDe8ZO80ExOW0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1626187524462481.9347980949319; Tue, 13 Jul 2021 07:45:24 -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-353-Mr3pZ61ONG2UvREULrMyaQ-1; Tue, 13 Jul 2021 10:45:21 -0400 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 38F17100C675; Tue, 13 Jul 2021 14:45:15 +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 176955DA61; Tue, 13 Jul 2021 14:45:15 +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 D21AA4EA39; Tue, 13 Jul 2021 14:45:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16DEiuPN032029 for ; Tue, 13 Jul 2021 10:44:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id F3B621042A51; Tue, 13 Jul 2021 14:44:55 +0000 (UTC) Received: from work.redhat.com (ovpn-113-139.ams2.redhat.com [10.36.113.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48F8C1009962; Tue, 13 Jul 2021 14:44:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626187523; 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=ePD7QgoRjNZKGqvty1CCh5bX+wq2uAW7gCQLWD4Z/Rs=; b=YwI/BadYE8EchI/e9wUH4Zfm7+O70KkafFYS34UK01OdfDP6zHFEFeXz7wJDpcFQKLRnzj Oyqmkq0WwQsVYklUxez80qTxv1JV1zH+jzYudmWfdsnknYMfiEGV2DvsE1AZ88Ja4AYx/z hU+1/vNjNSB/Rve0CR7IYIx4IdHL4I4= X-MC-Unique: Mr3pZ61ONG2UvREULrMyaQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 09/10] virNWFilterBuildAll: `virHashNew` cannot return NULL Date: Tue, 13 Jul 2021 16:44:40 +0200 Message-Id: <20210713144441.60635-10-twiederh@redhat.com> In-Reply-To: <20210713144441.60635-1-twiederh@redhat.com> References: <20210713144441.60635-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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: 1626187527173100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/nwfilter/nwfilter_gentech_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter= _gentech_driver.c index 8aa1db23d3..da4f71daf1 100644 --- a/src/nwfilter/nwfilter_gentech_driver.c +++ b/src/nwfilter/nwfilter_gentech_driver.c @@ -1007,8 +1007,7 @@ virNWFilterBuildAll(virNWFilterDriverState *driver, VIR_DEBUG("Build all filters newFilters=3D%d", newFilters); =20 if (newFilters) { - if (!(data.skipInterfaces =3D virHashNew(NULL))) - return -1; + data.skipInterfaces =3D virHashNew(NULL); =20 data.step =3D STEP_APPLY_NEW; if (virNWFilterBindingObjListForEach(driver->bindings, --=20 2.31.1 From nobody Fri May 3 14:59:26 2024 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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=1626187526; cv=none; d=zohomail.com; s=zohoarc; b=UNmqA/WR8VTn8ScqLSwltrrlynzV1UNtQ/1Qqs645AMO2/2pJ1A8re0lvTqHIjzspfIisu49nyVCaxzO600AS0HdVyuBrUBWqHNJfX3n48dsXDFl1utqlNRR5G92SLesOg+G+fApsc0lSFfVQegBxaqnrwOgCFc2XpE/uK+akZI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626187526; 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=uRBI5ZAT2KbGSHn/uporEcdOOdlYBfEwWRCJ/FrLlN4=; b=kGgYBar5bTIUY+U/CpKjqUWWWmsbFivE9ig9MOTMAQurCMh3lKwlkK7CymNpc2WCPc0xQJC52H5S5xl77R616djzTaSD8r7P4Tx2EeckBmqTHsot3ouk88lxuIzshTWwTYNb8pT7zMTgxZ8cjM9Lf9INdtKT11uKpFJRvH6Cobs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1626187526755574.9894136657906; Tue, 13 Jul 2021 07:45:26 -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-287-bxcyoKN1PD2nHJRcTn27TQ-1; Tue, 13 Jul 2021 10:45:24 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4C4D58BDEA4; Tue, 13 Jul 2021 14:45:18 +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 0E2AA60BD8; Tue, 13 Jul 2021 14:45: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 C51DB4EA3D; Tue, 13 Jul 2021 14:45:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16DEivSV032042 for ; Tue, 13 Jul 2021 10:44:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 084891042A50; Tue, 13 Jul 2021 14:44:57 +0000 (UTC) Received: from work.redhat.com (ovpn-113-139.ams2.redhat.com [10.36.113.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5209A1009962; Tue, 13 Jul 2021 14:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626187525; 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=uRBI5ZAT2KbGSHn/uporEcdOOdlYBfEwWRCJ/FrLlN4=; b=SwJ6OdjzenCp5n0GSBLReeC1ZXJJiOLlyvV0HdPhFUs/03qVZN4OtvJNTNsWLmTAtYYR3i UEMnP7tovA67tZ14gNstozBEZUs+AzvRck38ES9Ry9bzW+6PjU4UMFeXHqWGk87QUWpga4 WCRlDiA4DG05i5IPt3xd7sa5xZhSe9E= X-MC-Unique: bxcyoKN1PD2nHJRcTn27TQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 10/10] virNWFilterDHCPSnoopInit: `virHashNew` cannot return NULL Date: Tue, 13 Jul 2021 16:44:41 +0200 Message-Id: <20210713144441.60635-11-twiederh@redhat.com> In-Reply-To: <20210713144441.60635-1-twiederh@redhat.com> References: <20210713144441.60635-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.11 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: 1626187529052100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/nwfilter/nwfilter_dhcpsnoop.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcp= snoop.c index 2481ea5371..4b62a7b661 100644 --- a/src/nwfilter/nwfilter_dhcpsnoop.c +++ b/src/nwfilter/nwfilter_dhcpsnoop.c @@ -1998,27 +1998,10 @@ virNWFilterDHCPSnoopInit(void) virNWFilterSnoopState.snoopReqs =3D virHashNew(virNWFilterSnoopReqRelease); =20 - if (!virNWFilterSnoopState.ifnameToKey || - !virNWFilterSnoopState.snoopReqs || - !virNWFilterSnoopState.active) - goto error; - virNWFilterSnoopLeaseFileLoad(); virNWFilterSnoopLeaseFileOpen(); =20 return 0; - - error: - virHashFree(virNWFilterSnoopState.ifnameToKey); - virNWFilterSnoopState.ifnameToKey =3D NULL; - - virHashFree(virNWFilterSnoopState.snoopReqs); - virNWFilterSnoopState.snoopReqs =3D NULL; - - virHashFree(virNWFilterSnoopState.active); - virNWFilterSnoopState.active =3D NULL; - - return -1; } =20 /** --=20 2.31.1