Received: from eggs.gnu.org ([2001:4830:134:3::10]:32816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTM9x-0008Tf-Rh for qemu-devel@nongnu.org; Sun, 14 Sep 2014 22:37:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTM9o-0002aV-CE for qemu-devel@nongnu.org; Sun, 14 Sep 2014 22:36:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTM9o-0002aP-5A for qemu-devel@nongnu.org; Sun, 14 Sep 2014 22:36:48 -0400 Date: Mon, 15 Sep 2014 10:36:43 +0800 From: Fam Zheng Message-ID: <20140915023643.GE2639@fam-t430.nay.redhat.com> References: <1410516529-29719-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1410516529-29719-1-git-send-email-pbonzini@redhat.com> Subject: Re: [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: Paolo Bonzini Cc: kwolf@redhat.com, geleman@gmail.com, qemu-devel@nongnu.org, stefanha@redhat.com On Fri, 09/12 12:08, Paolo Bonzini wrote: > 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 > Reviewed-by: Fam Zheng