qemu/util
Markus Armbruster 2767ceec4e qemu-option: Clean up fragile use of error_is_set()
Using error_is_set(ERRP) to find out whether to bail out due to
previous error 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).

The error_is_set(state->errp) in qemu_opts_from_qdict_1() is merely
fragile, because the callers never pass state argument with null
state->errp.

Make the code more robust and more obviously correct: test
*state->errp directly.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-05-09 09:11:31 -04:00
..
acl.c acl: acl_add can't insert before last list element, fix 2013-06-21 22:52:50 +04:00
aes.c aes: Remove unused code (NDEBUG, u16) 2013-07-27 11:22:53 +04:00
bitmap.c bitmap: use long as index 2014-01-13 14:04:53 +01:00
bitops.c bitops: unroll while loop in find_next_bit() 2013-03-26 13:32:32 +01:00
cache-utils.c util: Use qemu_getauxval in linux qemu_cache_utils_init 2013-11-30 07:45:30 +13:00
compatfd.c Add a 'name' parameter to qemu_thread_create 2014-03-09 21:09:38 +02:00
crc32c.c qemu: add castagnoli crc32c checksum algorithm 2013-05-03 10:31:58 +02:00
cutils.c cutils: tighten qemu_parse_fd() 2014-05-08 14:19:58 -04:00
envlist.c util: Fix compilation of envlist.c for MinGW 2013-02-02 20:13:19 +00:00
error.c error: Consistently name Error ** objects errp, and not err 2014-05-09 09:11:30 -04:00
event_notifier-posix.c sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
event_notifier-win32.c build: move libqemuutil.a components to util/ 2013-01-12 18:42:50 +01:00
fifo8.c util/fifo8: clear fifo head upon reset 2014-02-08 14:50:48 +00:00
getauxval.c osdep: Create qemu_getauxval and qemu_init_auxval 2013-11-30 07:45:13 +13:00
hbitmap.c hbitmap: Use non-bitops ctzl 2013-02-16 11:11:34 +00:00
hexdump.c Rename hexdump to avoid FreeBSD libutil conflict 2013-05-20 08:20:08 -05:00
host-utils.c target-ppc: Add ISA2.06 divde[o] Instructions 2014-03-05 03:06:39 +01:00
iov.c util/iov: Use qemu/sockets.h instead of conditional code 2014-03-03 09:46:27 +04:00
Makefile.objs rfifolock: add recursive FIFO lock 2014-03-13 14:42:21 +01:00
module.c util: Add 'static' attribute to function implementation 2014-03-27 19:22:48 +04:00
notify.c notify: add NotiferWithReturn so notifier list can abort 2013-06-28 09:20:26 +02:00
osdep.c do not call g_thread_init() for glib >= 2.31 2014-05-07 21:00:43 +04:00
oslib-posix.c oslib-posix: Fix build on FreeBSD 2014-03-13 14:34:16 +00:00
oslib-win32.c util: Split out exec_dir from os_find_datadir 2014-02-20 13:12:54 +01:00
path.c init_paths: fix minor memory leak 2014-04-28 08:55:32 +04:00
qemu-config.c trivial patches for 2014-04-28 2014-04-28 13:43:17 +01:00
qemu-error.c error: Print error_report() to stderr if using qmp 2014-04-25 09:19:58 -04:00
qemu-openpty.c create qemu_openpty_raw() helper function and move it to a separate file 2013-06-14 14:28:43 +04:00
qemu-option.c qemu-option: Clean up fragile use of error_is_set() 2014-05-09 09:11:31 -04:00
qemu-progress.c qemu-progress: Fix progress printing on SIGUSR1 2014-01-24 14:33:00 +01:00
qemu-sockets.c qemu-option: Remove qemu_opts_create_nofail 2014-01-06 15:02:30 -05:00
qemu-thread-posix.c Detect pthread_setname_np at configure time 2014-03-27 17:48:11 +02:00
qemu-thread-win32.c Detect pthread_setname_np at configure time 2014-03-27 17:48:11 +02:00
qemu-timer-common.c Allow clock_gettime() monotonic clock to be utilized on more OS's 2013-04-04 20:22:45 -05:00
readline.c readline: Sort completions before printing them. 2014-05-07 21:00:44 +04:00
rfifolock.c rfifolock: add recursive FIFO lock 2014-03-13 14:42:21 +01:00
throttle.c throttle: Add a new throttling API implementing continuous leaky bucket. 2013-09-06 15:25:07 +02:00
unicode.c unicode: New mod_utf8_codepoint() 2013-04-13 19:39:59 +00:00
uri.c clean unnecessary code: don't check g_strdup arg for NULL 2013-05-12 13:25:55 +04:00