Re: [libvirt] [PATCH v1 15/40] util: firewall: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-25 Thread Erik Skultety
On Tue, Jul 24, 2018 at 10:46:54PM +0530, Sukrit Bhatnagar wrote: > On Tue, 24 Jul 2018 at 11:54, Erik Skultety wrote: > > > > On Mon, Jul 23, 2018 at 11:18:07PM +0530, Sukrit Bhatnagar wrote: > > > On Mon, 23 Jul 2018 at 18:39, Erik Skultety wrote: > > > > > > > > On Sat, Jul 21, 2018 at

Re: [libvirt] [PATCH v1 15/40] util: firewall: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-24 Thread Daniel P . Berrangé
On Tue, Jul 24, 2018 at 10:46:54PM +0530, Sukrit Bhatnagar wrote: > On Tue, 24 Jul 2018 at 11:54, Erik Skultety wrote: > > > > On Mon, Jul 23, 2018 at 11:18:07PM +0530, Sukrit Bhatnagar wrote: > > > On Mon, 23 Jul 2018 at 18:39, Erik Skultety wrote: > > > > > > > > On Sat, Jul 21, 2018 at

Re: [libvirt] [PATCH v1 15/40] util: firewall: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-24 Thread Sukrit Bhatnagar
On Tue, 24 Jul 2018 at 11:54, Erik Skultety wrote: > > On Mon, Jul 23, 2018 at 11:18:07PM +0530, Sukrit Bhatnagar wrote: > > On Mon, 23 Jul 2018 at 18:39, Erik Skultety wrote: > > > > > > On Sat, Jul 21, 2018 at 05:36:47PM +0530, Sukrit Bhatnagar wrote: > > > > By making use of GNU C's cleanup

Re: [libvirt] [PATCH v1 15/40] util: firewall: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-24 Thread Erik Skultety
On Mon, Jul 23, 2018 at 11:18:07PM +0530, Sukrit Bhatnagar wrote: > On Mon, 23 Jul 2018 at 18:39, Erik Skultety wrote: > > > > On Sat, Jul 21, 2018 at 05:36:47PM +0530, Sukrit Bhatnagar wrote: > > > By making use of GNU C's cleanup attribute handled by the > > > VIR_AUTOFREE macro for declaring

Re: [libvirt] [PATCH v1 15/40] util: firewall: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-23 Thread Sukrit Bhatnagar
On Mon, 23 Jul 2018 at 18:39, Erik Skultety wrote: > > On Sat, Jul 21, 2018 at 05:36:47PM +0530, Sukrit Bhatnagar wrote: > > By making use of GNU C's cleanup attribute handled by the > > VIR_AUTOFREE macro for declaring scalar variables, majority > > of the VIR_FREE calls can be dropped, which in

Re: [libvirt] [PATCH v1 15/40] util: firewall: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-23 Thread Erik Skultety
On Sat, Jul 21, 2018 at 05:36:47PM +0530, Sukrit Bhatnagar wrote: > By making use of GNU C's cleanup attribute handled by the > VIR_AUTOFREE macro for declaring scalar variables, majority > of the VIR_FREE calls can be dropped, which in turn leads to > getting rid of most of our cleanup sections.

[libvirt] [PATCH v1 15/40] util: firewall: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-07-21 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar --- src/util/virfirewall.c | 16