From: John Ferlan Date: Tue, 21 Mar 2017 16:53:49 +0000 (-0400) Subject: qemu: Always format formatStr for blockdev-snapshot-sync X-Git-Tag: v3.2.0-rc1~184 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2a76a263fad2c98bd4ab23950e08390bf9ebf66;p=thirdparty%2Flibvirt.git 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. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 0e065081db..6762952080 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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.