qemu-e2k/hw/core
Markus Armbruster 65cd9064e1 qom: Clean up fragile use of error_is_set() in set() methods
Using error_is_set(ERRP) to find out whether a function failed is
either wrong, fragile, or unnecessarily opaque.  It's wrong when ERRP
may be null, because errors go undetected when it is.  It's fragile
when proving ERRP non-null involves a non-local argument.  Else, it's
unnecessarily opaque (see commit 84d18f0).

I guess the error_is_set(errp) in the ObjectProperty set() methods are
merely fragile right now, because I can't find a call chain that
passes a null errp argument.

Make the code more robust and more obviously correct: receive the
error in a local variable, then propagate it through the parameter.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-05-05 19:08:49 +02:00
..
empty_slot.c
fw-path-provider.c fw-path-provider: Change GPL version to 2+ 2014-04-07 15:36:07 +02:00
hotplug.c define hotplug interface 2014-02-10 10:23:35 +02:00
irq.c hw/core: Add interface to allocate and free a single IRQ 2013-10-14 17:11:44 +03:00
loader.c pc: avoid duplicate names for ROM MRs 2014-03-11 13:25:48 +02:00
machine.c hw/core: Introduce QEMU machine as QOM object 2014-03-12 20:13:02 +01:00
Makefile.objs qdev: Introduce FWPathProvider interface 2014-03-20 02:40:13 +01:00
null-machine.c hw: Clean up bogus default boot order 2013-08-28 10:16:47 +03:00
ptimer.c
qdev-properties-system.c hw: Consistently name Error * objects err, and not errp 2014-05-05 19:08:49 +02:00
qdev-properties.c qom: Clean up fragile use of error_is_set() in set() methods 2014-05-05 19:08:49 +02:00
qdev.c hw: Consistently name Error ** objects errp, and not err 2014-05-05 19:08:49 +02:00
stream.c
sysbus.c sysbus: Set cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
uboot_image.h