]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: return -1 on error paths in qemuDomainSaveImageStartVM
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Mon, 1 Feb 2016 13:28:40 +0000 (16:28 +0300)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 3 Feb 2016 09:27:35 +0000 (10:27 +0100)
commit4a67b044fbe8f64ebb37a105bdebd3487cc2b707
tree724c4fb6bfd8129447e82858e0892ae6b759a51a
parent6ec319b84f67d72bf59fe7e0fd41d88ee9c393c7
qemu: return -1 on error paths in qemuDomainSaveImageStartVM

Error paths after sending the event that domain is started written as if ret = -1
which is set at the beginning of the function. It's common idioma to keep 'ret'
equal to -1 until the end of function where it is set to 0. But here we use ret
to keep result of restore operation too and thus breaks the idioma and its users :)

Let's use different variable to hold restore result.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
src/qemu/qemu_driver.c