[RFC PATCH 03/41] qemuBackupDiskDataCleanup: Use VIR_ERROR_AUTO_PRESERVE_LAST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Example usage of the new macro.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux