]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Always format formatStr for blockdev-snapshot-sync
authorJohn Ferlan <jferlan@redhat.com>
Tue, 21 Mar 2017 16:53:49 +0000 (12:53 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 22 Mar 2017 17:49:59 +0000 (13:49 -0400)
The qemuDomainSnapshotPrepare should always set a > 0 format value anyway,
so remove the check.

Found by Coverity.

src/qemu/qemu_driver.c

index 0e065081db1b6d5aaeaabe49bce4259635e1b8ef..67629520805a7faa6239ce8ed94ac51de0cdddfa 100644 (file)
@@ -14072,8 +14072,7 @@ qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver,
     dd->prepared = true;
 
     /* create the actual snapshot */
-    if (dd->src->format)
-        formatStr = virStorageFileFormatTypeToString(dd->src->format);
+    formatStr = virStorageFileFormatTypeToString(dd->src->format);
 
     /* The monitor is only accessed if qemu doesn't support transactions.
      * Otherwise the following monitor command only constructs the command.