Re: [Qemu-devel] [PATCH] Use error_is_set() only when necessary

2014-02-21 Thread Kevin Wolf
Am 30.01.2014 um 15:07 hat Markus Armbruster geschrieben: > 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 C

Re: [Qemu-devel] [PATCH] Use error_is_set() only when necessary

2014-02-11 Thread Markus Armbruster
Fam Zheng writes: > On Mon, 02/10 15:54, Luiz Capitulino wrote: >> > @@ -875,13 +875,13 @@ DriveInfo *drive_init(QemuOpts *all_opts, >> > BlockInterfaceType block_default_type) >> > /* Actual block device init: Functionality shared with blockdev-add */ >> > dinfo = blockdev_init(filena

Re: [Qemu-devel] [PATCH] Use error_is_set() only when necessary

2014-02-10 Thread Fam Zheng
On Mon, 02/10 15:54, Luiz Capitulino wrote: > > @@ -875,13 +875,13 @@ DriveInfo *drive_init(QemuOpts *all_opts, > > BlockInterfaceType block_default_type) > > /* Actual block device init: Functionality shared with blockdev-add */ > > dinfo = blockdev_init(filename, bs_opts, type, &local_

Re: [Qemu-devel] [PATCH] Use error_is_set() only when necessary

2014-01-30 Thread Markus Armbruster
Andreas Färber writes: > Am 30.01.2014 15:07, schrieb Markus Armbruster: >> 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

Re: [Qemu-devel] [PATCH] Use error_is_set() only when necessary

2014-01-30 Thread Andreas Färber
Am 30.01.2014 15:07, schrieb Markus Armbruster: > 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 fa

Re: [Qemu-devel] [PATCH] Use error_is_set() only when necessary

2014-01-30 Thread Markus Armbruster
Eric Blake writes: > On 01/30/2014 07:07 AM, Markus Armbruster wrote: >> 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 ri

Re: [Qemu-devel] [PATCH] Use error_is_set() only when necessary

2014-01-30 Thread Eric Blake
On 01/30/2014 07:07 AM, Markus Armbruster wrote: > 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 f

[Qemu-devel] [PATCH] Use error_is_set() only when necessary

2014-01-30 Thread Markus Armbruster
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 i