On 12/17/2015 09:49 AM, Markus Armbruster wrote: > 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 <arm...@redhat.com> > --- > tests/test-throttle.c | 15 +-------------- > 1 file changed, 1 insertion(+), 14 deletions(-)
Much simpler :) Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature