qemu: Always format formatStr for blockdev-snapshot-sync

The qemuDomainSnapshotPrepare should always set a > 0 format value anyway,
so remove the check.

Found by Coverity.
This commit is contained in:
John Ferlan 2017-03-21 12:53:49 -04:00
parent 85bcc0220f
commit f2a76a263f

View 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.