From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUzOc-0006Oz-07 for qemu-devel@nongnu.org; Fri, 19 Sep 2014 10:42:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUzOV-00072Q-RZ for qemu-devel@nongnu.org; Fri, 19 Sep 2014 10:42:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUzOV-00070S-K6 for qemu-devel@nongnu.org; Fri, 19 Sep 2014 10:42:43 -0400 From: Stefan Hajnoczi Date: Fri, 19 Sep 2014 15:41:22 +0100 Message-Id: <1411137738-31280-4-git-send-email-stefanha@redhat.com> In-Reply-To: <1411137738-31280-1-git-send-email-stefanha@redhat.com> References: <1411137738-31280-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 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