Re: [libvirt] [PATCH 1/4] util: alloc: Remove pointless clearing of variable in AUTOPTR_FUNCs

2019-02-26 Thread Daniel P . Berrangé
On Tue, Feb 26, 2019 at 03:03:01PM +0100, Peter Krempa wrote: > On Tue, Feb 26, 2019 at 13:30:55 +, Daniel Berrange wrote: > > On Tue, Feb 26, 2019 at 02:10:02PM +0100, Peter Krempa wrote: > > > On Mon, Feb 25, 2019 at 15:18:53 +0100, Erik Skultety wrote: > > > > On Fri, Feb 22, 2019 at

Re: [libvirt] [PATCH 1/4] util: alloc: Remove pointless clearing of variable in AUTOPTR_FUNCs

2019-02-26 Thread Peter Krempa
On Tue, Feb 26, 2019 at 13:30:55 +, Daniel Berrange wrote: > On Tue, Feb 26, 2019 at 02:10:02PM +0100, Peter Krempa wrote: > > On Mon, Feb 25, 2019 at 15:18:53 +0100, Erik Skultety wrote: > > > On Fri, Feb 22, 2019 at 05:04:37PM +0100, Peter Krempa wrote: > > > > VIR_DEFINE_AUTOPTR_FUNC

Re: [libvirt] [PATCH 1/4] util: alloc: Remove pointless clearing of variable in AUTOPTR_FUNCs

2019-02-26 Thread Daniel P . Berrangé
On Tue, Feb 26, 2019 at 02:10:02PM +0100, Peter Krempa wrote: > On Mon, Feb 25, 2019 at 15:18:53 +0100, Erik Skultety wrote: > > On Fri, Feb 22, 2019 at 05:04:37PM +0100, Peter Krempa wrote: > > > VIR_DEFINE_AUTOPTR_FUNC defines a function which is supposed to free the > > > resources for the

Re: [libvirt] [PATCH 1/4] util: alloc: Remove pointless clearing of variable in AUTOPTR_FUNCs

2019-02-26 Thread Peter Krempa
On Mon, Feb 25, 2019 at 15:18:53 +0100, Erik Skultety wrote: > On Fri, Feb 22, 2019 at 05:04:37PM +0100, Peter Krempa wrote: > > 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

Re: [libvirt] [PATCH 1/4] util: alloc: Remove pointless clearing of variable in AUTOPTR_FUNCs

2019-02-25 Thread Erik Skultety
On Fri, Feb 22, 2019 at 05:04:37PM +0100, Peter Krempa wrote: > 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

[libvirt] [PATCH 1/4] util: alloc: Remove pointless clearing of variable in AUTOPTR_FUNCs

2019-02-22 Thread Peter Krempa
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