From nobody Tue Feb 10 05:45:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1550851492730302.1301586020368; Fri, 22 Feb 2019 08:04:52 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id DF8607DCC2; Fri, 22 Feb 2019 16:04:50 +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 8F8DE5D9CA; Fri, 22 Feb 2019 16:04:50 +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 3DD5241F3F; Fri, 22 Feb 2019 16:04:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1MG4jrt015181 for ; Fri, 22 Feb 2019 11:04:45 -0500 Received: by smtp.corp.redhat.com (Postfix) id 808405D9D4; Fri, 22 Feb 2019 16:04:45 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 066785D9CA for ; Fri, 22 Feb 2019 16:04:44 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 22 Feb 2019 17:04:37 +0100 Message-Id: <5d0750659d94f4359813b363421e1df673dda8f0.1550851418.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/4] util: alloc: Remove pointless clearing of variable in AUTOPTR_FUNCs 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 22 Feb 2019 16:04:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" VIR_DEFINE_AUTOPTR_FUNC defines a function which is supposed to free the resources for the given VIR_AUTOPTR variable. Given that the cleanup function is executed when the stack frame is being destroyed it does not make much sense to set the pointer to NULL. Making the inline function contain less code also decreases the possibility that for a given type the inlining will be declined by the compiler due to increasing code size. Signed-off-by: Peter Krempa --- src/util/viralloc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/viralloc.h b/src/util/viralloc.h index 15451d4673..50a07d4fa3 100644 --- a/src/util/viralloc.h +++ b/src/util/viralloc.h @@ -612,7 +612,6 @@ void virAllocTestHook(void (*func)(int, void*), void *d= ata); { \ if (*_ptr) \ (func)(*_ptr); \ - *_ptr =3D NULL; \ } # define VIR_AUTOCLEAN_FUNC_NAME(type) type##AutoClean --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list