From: Paolo Bonzini Date: Fri, 12 Sep 2014 10:08:49 +0000 (+0200) Subject: aio-win32: fix uninitialized use of have_select_revents X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6698c5bed290f3852c9f200d197b5d99211bc3cd;p=qemu.git aio-win32: fix uninitialized use of have_select_revents Always initialize it with the return value of aio_prepare. Reported-by: TeLeMan Signed-off-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- diff --git a/aio-win32.c b/aio-win32.c index 61e3d2ddfe..7daeae18f1 100644 --- a/aio-win32.c +++ b/aio-win32.c @@ -283,9 +283,9 @@ bool aio_poll(AioContext *ctx, bool blocking) int count; int timeout; - if (aio_prepare(ctx)) { + have_select_revents = aio_prepare(ctx); + if (have_select_revents) { blocking = false; - have_select_revents = true; } was_dispatching = ctx->dispatching;