[libvirt] [PATCH v2 32/32] util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageSource

Erik Skultety eskultet at redhat.com
Mon Feb 11 12:44:33 UTC 2019


On Fri, Feb 08, 2019 at 01:37:26PM -0500, John Ferlan wrote:
> Let's make use of the auto __cleanup capabilities cleaning up any
> now unnecessary goto paths.
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
...
>              target->backingStore->type = VIR_STORAGE_TYPE_NETWORK;
>              target->backingStore->path = meta->backingStoreRaw;
> @@ -3430,8 +3428,6 @@ storageBackendProbeTarget(virStorageSourcePtr target,
>      target->format = meta->format;
>
>      /* Default to success below this point */
> -    ret = 0;
> -

Not sure how much sense the comment makes without ^this hunk, I think we can
drop it too

MinGW is still stuborn about inlining in certain VIR_AUTO cases, I'm wondering
why GCC and Clang are okay with that and whether we should drop -Winline or go
without the cases that MinGW is sad about, I tried to lookup something related,
but it doesn't seem to be a recent bug in MinGW.

I'm okay with the changes, but I don't want to have a failing build for the
next X weeks, so I'd say drop the violators:

Reviewed-by: Erik Skultety <eskultet at redhat.com>




More information about the libvir-list mailing list