From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, geleman@gmail.com, famz@redhat.com,
stefanha@redhat.com
Subject: [Qemu-devel] [PATCH] aio-win32: fix uninitialized use of have_select_revents
Date: Fri, 12 Sep 2014 12:08:49 +0200 [thread overview]
Message-ID: <1410516529-29719-1-git-send-email-pbonzini@redhat.com> (raw)
Always initialize it with the return value of aio_prepare.
Reported-by: TeLeMan <geleman@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
aio-win32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/aio-win32.c b/aio-win32.c
index 61e3d2d..7daeae1 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;
--
2.1.0
next reply other threads:[~2014-09-12 10:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 10:08 Paolo Bonzini [this message]
2014-09-12 14:20 ` [Qemu-devel] [PATCH] aio-win32: fix uninitialized use of have_select_revents Stefan Hajnoczi
2014-09-15 2:36 ` Fam Zheng
2014-09-15 15:51 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410516529-29719-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=famz@redhat.com \
--cc=geleman@gmail.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).