• M
    test-throttle: Simplify qemu_init_main_loop() error handling · 73eaa047
    Markus Armbruster 提交于
    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: NMarkus Armbruster <armbru@redhat.com>
    Reviewed-by: NEric Blake <eblake@redhat.com>
    Message-Id: <1450452927-8346-9-git-send-email-armbru@redhat.com>
    73eaa047
test-throttle.c 18.1 KB