Re: [libvirt] [PATCH 15/15] util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageSource

2019-02-08 Thread John Ferlan
On 2/8/19 3:07 AM, Erik Skultety wrote: > On Wed, Feb 06, 2019 at 08:41:47AM -0500, John Ferlan wrote: >> Let's make use of the auto __cleanup capabilities cleaning up any >> now unnecessary goto paths. A few methods were modified to use a >> more common methodology of defining/using @def and th

Re: [libvirt] [PATCH 15/15] util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageSource

2019-02-08 Thread Erik Skultety
On Wed, Feb 06, 2019 at 08:41:47AM -0500, John Ferlan wrote: > Let's make use of the auto __cleanup capabilities cleaning up any > now unnecessary goto paths. A few methods were modified to use a > more common methodology of defining/using @def and then stealing > the pointer to @ret to return allo

[libvirt] [PATCH 15/15] util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageSource

2019-02-06 Thread John Ferlan
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. A few methods were modified to use a more common methodology of defining/using @def and then stealing the pointer to @ret to return allowing @def to be autofree'd if the swap didn't occur on various return