mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
util: Use VIR_STEAL_PTR in virstoragefile
Rather than open coding virStorageFileGetRelativeBackingPath and virStorageFileGetMetadataRecurse, let's make use of the VIR_STEAL_PTR macro. Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a1c453dc08
commit
5d693534fa
@ -4208,8 +4208,7 @@ virStorageFileGetRelativeBackingPath(virStorageSourcePtr top,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
*relpath = path;
|
||||
path = NULL;
|
||||
VIR_STEAL_PTR(*relpath, path);
|
||||
|
||||
ret = 0;
|
||||
|
||||
@ -4947,8 +4946,7 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr src,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
src->backingStore = backingStore;
|
||||
backingStore = NULL;
|
||||
VIR_STEAL_PTR(src->backingStore, backingStore);
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
|
Loading…
Reference in New Issue
Block a user