Re: [libvirt] [PATCH 4/6] util: netdev: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE

2018-09-12 Thread Erik Skultety
On Tue, Sep 11, 2018 at 11:37:45PM +0800, Shi Lei wrote: > On 2018-09-11 at 20:44, Erik Skultety wrote: > >On Mon, Sep 10, 2018 at 11:47:53AM +0800, Shi Lei wrote: > >> By making use of GNU C's cleanup attribute handled by the VIR_AUTOCLOSE > >> macro, > >> many of the VIR_FORCE_CLOSE calls can be

Re: [libvirt] [PATCH 4/6] util: netdev: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE

2018-09-11 Thread Shi Lei
On 2018-09-11 at 20:44, Erik Skultety wrote: >On Mon, Sep 10, 2018 at 11:47:53AM +0800, Shi Lei wrote: >> By making use of GNU C's cleanup attribute handled by the VIR_AUTOCLOSE >> macro, >> many of the VIR_FORCE_CLOSE calls can be dropped, which in turn leads to >> getting rid of many of our clea

Re: [libvirt] [PATCH 4/6] util: netdev: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE

2018-09-11 Thread Erik Skultety
On Mon, Sep 10, 2018 at 11:47:53AM +0800, Shi Lei wrote: > By making use of GNU C's cleanup attribute handled by the VIR_AUTOCLOSE macro, > many of the VIR_FORCE_CLOSE calls can be dropped, which in turn leads to > getting rid of many of our cleanup sections. > > Signed-off-by: Shi Lei > --- > sr

[libvirt] [PATCH 4/6] util: netdev: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE

2018-09-09 Thread Shi Lei
By making use of GNU C's cleanup attribute handled by the VIR_AUTOCLOSE macro, many of the VIR_FORCE_CLOSE calls can be dropped, which in turn leads to getting rid of many of our cleanup sections. Signed-off-by: Shi Lei --- src/util/virnetdev.c | 253 +++--