]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: fix uninitialized variable warning
authorChristophe Fergeau <cfergeau@redhat.com>
Mon, 2 May 2011 09:10:10 +0000 (11:10 +0200)
committerEric Blake <eblake@redhat.com>
Mon, 2 May 2011 15:23:47 +0000 (09:23 -0600)
commitb15a8a1bdf0fa4f0d6a5a424caca4070c8eeafbb
tree37c8006ec54d354e2b163d088de5d2925e6f1f3f
parent170f2a87474c97b4c39373b36b2353f4e2dbc908
qemu: fix uninitialized variable warning

This commit fixes
qemu/qemu_driver.c: In function 'qemuDomainModifyDeviceFlags':
qemu/qemu_driver.c:4041:8: warning: 'ret' may be used uninitialized in this
function [-Wuninitialized]
qemu/qemu_driver.c:4013:9: note: 'ret' was declared here

The variable is set to -1 so that the error paths are taken when the code
to set it didn't get a chance to run. Without initializing it, we could
return some an undefined value from this function.

While I was at it, I made a trivial whitespace change in the same function
to improve readability.
src/qemu/qemu_driver.c