[PATCH 1/7] qemuSnapshotPrepareDiskExternal: Move temp variables into the block using them

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

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_snapshot.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index 29e86342d6..67180a2b10 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -541,9 +541,6 @@ qemuSnapshotPrepareDiskExternal(virDomainObj *vm,
                                 bool reuse,
                                 bool blockdev)
 {
-    struct stat st;
-    int err;
-    int rc;

     if (disk->src->readonly && !(reuse || blockdev)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
@@ -567,6 +564,10 @@ qemuSnapshotPrepareDiskExternal(virDomainObj *vm,
     }

     if (virStorageSourceIsLocalStorage(snapdisk->src)) {
+        struct stat st;
+        int err;
+        int rc;
+
         if (virStorageSourceInit(snapdisk->src) < 0)
             return -1;

-- 
2.31.1




[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