diff options
author | 2015-12-18 16:35:11 +0100 | |
---|---|---|
committer | 2016-01-13 15:16:17 +0100 | |
commit | 73eaa04777001e6d68181910ed36729528f77d74 (patch) | |
tree | 77c61d71e04555c48cd1b19f8ea2509b590a2950 /include/qapi/error.h | |
parent | qemu-nbd: Clean up "Failed to load snapshot" error message (diff) | |
download | qemu-73eaa04777001e6d68181910ed36729528f77d74.tar.xz qemu-73eaa04777001e6d68181910ed36729528f77d74.zip |
test-throttle: Simplify qemu_init_main_loop() error handling
The code looks like it tries to check for both qemu_init_main_loop()
and qemu_get_aio_context() failure in one conditional. In fact,
qemu_get_aio_context() can fail only after qemu_init_main_loop()
failed.
Simplify accordingly: check for qemu_init_main_loop() error directly,
without bothering to improve its error message. Call
qemu_get_aio_context() only when qemu_get_aio_context() succeeded. It
can't fail then, so no need to check.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1450452927-8346-9-git-send-email-armbru@redhat.com>
Diffstat (limited to 'include/qapi/error.h')
0 files changed, 0 insertions, 0 deletions