aio-win32: fix uninitialized use of have_select_revents
Always initialize it with the return value of aio_prepare. Reported-by: TeLeMan <geleman@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
d735b620b5
commit
6698c5bed2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user