From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW21B-0004OP-Fu for qemu-devel@nongnu.org; Mon, 22 Sep 2014 07:43:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XW215-0007U9-B2 for qemu-devel@nongnu.org; Mon, 22 Sep 2014 07:42:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW215-0007Rs-3J for qemu-devel@nongnu.org; Mon, 22 Sep 2014 07:42:51 -0400 From: Stefan Hajnoczi Date: Mon, 22 Sep 2014 12:41:34 +0100 Message-Id: <1411386150-24003-4-git-send-email-stefanha@redhat.com> In-Reply-To: <1411386150-24003-1-git-send-email-stefanha@redhat.com> References: <1411386150-24003-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL v2 03/59] 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: Peter Maydell , Stefan Hajnoczi , Paolo Bonzini From: Paolo Bonzini 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 --- 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; -- 1.9.3