[RFC PATCH 03/41] qemuBackupDiskDataCleanup: Use VIR_ERROR_AUTO_PRESERVE_LAST
Peter Krempa
pkrempa at redhat.com
Tue Jun 9 15:00:10 UTC 2020
Example usage of the new macro.
Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
src/qemu/qemu_backup.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index b317b841cd..ac7fa5def3 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -157,19 +157,16 @@ qemuBackupDiskDataCleanup(virDomainObjPtr vm,
struct qemuBackupDiskData *dd,
size_t ndd)
{
- virErrorPtr orig_err;
+ VIR_ERROR_AUTOPRESERVE_LAST;
size_t i;
if (!dd)
return;
- virErrorPreserveLast(&orig_err);
-
for (i = 0; i < ndd; i++)
qemuBackupDiskDataCleanupOne(vm, dd + i);
g_free(dd);
- virErrorRestore(&orig_err);
}
--
2.26.2
More information about the libvir-list
mailing list