]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainDetachDeviceLiveAndConfig: Avoid overwriting @ret
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 23 May 2018 13:59:55 +0000 (15:59 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 28 May 2018 11:08:51 +0000 (13:08 +0200)
commita7837f92cc724f00a20a7459fa536f830e341398
treefa037290ebb1c9ae07a281c8d494bf0e463b1ecc
parent604f3ff0c0244c53a84f515f749cd4bd243d0ac8
qemuDomainDetachDeviceLiveAndConfig: Avoid overwriting @ret

The fact that we are overwriting @ret multiple times makes it
difficult to see what is actually happening here. Follow our
traditional pattern where @ret is initialized to -1, and set to 0
only in case we know we succeeded.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c