]> git.proxmox.com Git - mirror_qemu.git/commit - vl.c
Use error_is_set() only when necessary
authorMarkus Armbruster <armbru@redhat.com>
Thu, 30 Jan 2014 14:07:28 +0000 (15:07 +0100)
committerLuiz Capitulino <lcapitulino@redhat.com>
Mon, 17 Feb 2014 16:57:23 +0000 (11:57 -0500)
commit84d18f065fb041a1c0d78d20320d740ae0673c8a
treec43dbfdadc21d4fff0f173f9413396cd314927f9
parentff9ec34de8f6a37bd29ac72c0c4c94bd5d43d7b0
Use error_is_set() only when necessary

error_is_set(&var) is the same as var != NULL, but it takes
whole-program analysis to figure that out.  Unnecessarily hard for
optimizers, static checkers, and human readers.  Dumb it down to
obvious.

Gets rid of several dozen Coverity false positives.

Note that the obvious form is already used in many places.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
37 files changed:
block.c
block/blkdebug.c
block/blkverify.c
block/curl.c
block/gluster.c
block/iscsi.c
block/nbd.c
block/qapi.c
block/qcow2.c
block/raw-posix.c
block/raw-win32.c
block/raw_bsd.c
block/rbd.c
block/sheepdog.c
block/snapshot.c
block/vvfat.c
blockdev.c
blockjob.c
hmp.c
hw/pci/pci-hotplug-old.c
hw/usb/dev-network.c
net/net.c
qdev-monitor.c
qemu-char.c
qemu-img.c
qga/commands-posix.c
qga/commands-win32.c
savevm.c
tests/test-qmp-input-strict.c
tests/test-qmp-input-visitor.c
tests/test-qmp-output-visitor.c
tests/test-string-input-visitor.c
tests/test-string-output-visitor.c
tpm.c
util/qemu-config.c
util/qemu-option.c
vl.c