]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: move flag setting after declarations
authorJán Tomko <jtomko@redhat.com>
Mon, 18 Feb 2013 11:50:46 +0000 (12:50 +0100)
committerJán Tomko <jtomko@redhat.com>
Sun, 24 Feb 2013 17:11:40 +0000 (18:11 +0100)
src/storage/storage_backend.c

index 87eca5ea204c556bbc0043d735b45fd7d7dcd0be..295fd32b2130367bb8bdc8ce5948475dbb4c1eb6 100644 (file)
@@ -652,10 +652,6 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
     unsigned long long int size_arg;
     bool preallocate = false;
 
-    virCheckFlags(VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA, -1);
-
-    preallocate = !!(flags & VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA);
-
     const char *type = virStorageFileFormatTypeToString(vol->target.format);
     const char *backingType = vol->backingStore.path ?
         virStorageFileFormatTypeToString(vol->backingStore.format) : NULL;
@@ -670,6 +666,10 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
                                          inputvol->target.format) :
         NULL;
 
+    virCheckFlags(VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA, NULL);
+
+    preallocate = !!(flags & VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA);
+
     if (type == NULL) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("unknown storage vol type %d"),