From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSNn5-00010j-VT for qemu-devel@nongnu.org; Fri, 12 Sep 2014 06:09:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSNmu-0005YK-0w for qemu-devel@nongnu.org; Fri, 12 Sep 2014 06:09:19 -0400 Received: from mail-qg0-x22a.google.com ([2607:f8b0:400d:c04::22a]:46777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSNmt-0005Y9-T1 for qemu-devel@nongnu.org; Fri, 12 Sep 2014 06:09:07 -0400 Received: by mail-qg0-f42.google.com with SMTP id q107so458526qgd.1 for ; Fri, 12 Sep 2014 03:09:07 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 12 Sep 2014 12:08:49 +0200 Message-Id: <1410516529-29719-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] aio-win32: fix uninitialized use of have_select_revents List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, geleman@gmail.com, famz@redhat.com, stefanha@redhat.com Always initialize it with the return value of aio_prepare. Reported-by: TeLeMan Signed-off-by: Paolo Bonzini --- 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