From: Peter Maydell <peter.maydell@linaro.org>
To: Alistair Francis <alistair.francis@xilinx.com>
Cc: "QEMU Developers" <qemu-devel@nongnu.org>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Fam Zheng" <famz@redhat.com>,
"Edgar Iglesias" <edgar.iglesias@xilinx.com>,
"Philippe Mathieu-Daudé" <philippe@mathieu-daude.net>,
Qemu-block <qemu-block@nongnu.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Alistair Francis" <alistair23@gmail.com>
Subject: Re: [Qemu-devel] [PATCH v1 2/3] util/oslib-win32: Remove invalid check
Date: Fri, 30 Jun 2017 11:05:38 +0100 [thread overview]
Message-ID: <CAFEAcA9oucBm84kep7NHBM1UP6LRdRCfOAS7_buKo_8DTKjeSA@mail.gmail.com> (raw)
In-Reply-To: <199bd37fe51c4b240da9834673c065ea042b9897.1498756113.git.alistair.francis@xilinx.com>
On 29 June 2017 at 18:16, Alistair Francis <alistair.francis@xilinx.com> wrote:
> There is no way nhandles can be zero in this section so that part of the
> if statement will always be false. Let's just remove it to make the code
> easier to read.
>
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Reviewed-by: Fam Zheng <famz@redhat.com>
> ---
>
> util/oslib-win32.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/util/oslib-win32.c b/util/oslib-win32.c
> index 80e4668935..7ec0f8e083 100644
> --- a/util/oslib-win32.c
> +++ b/util/oslib-win32.c
> @@ -414,7 +414,7 @@ static int poll_rest(gboolean poll_msgs, HANDLE *handles, gint nhandles,
> /* If we have a timeout, or no handles to poll, be satisfied
> * with just noticing we have messages waiting.
> */
> - if (timeout != 0 || nhandles == 0) {
> + if (timeout != 0) {
> return 1;
> }
The comment and the code now don't match -- does the comment
need updating too?
thanks
-- PMM
next prev parent reply other threads:[~2017-06-30 10:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 17:16 [Qemu-devel] [PATCH v1 0/3] Windows runtime improvements Alistair Francis
2017-06-29 17:16 ` [Qemu-devel] [PATCH v1 1/3] util/aio-win32: Only select on what we are actually waiting for Alistair Francis
2017-06-29 17:29 ` Philippe Mathieu-Daudé
2017-06-29 17:16 ` [Qemu-devel] [PATCH v1 2/3] util/oslib-win32: Remove invalid check Alistair Francis
2017-06-30 10:03 ` Paolo Bonzini
2017-06-30 10:05 ` Peter Maydell [this message]
2017-06-29 17:16 ` [Qemu-devel] [PATCH v1 3/3] util/oslib-win32: Remove if conditional Alistair Francis
2017-07-06 8:29 ` [Qemu-devel] [PATCH v1 0/3] Windows runtime improvements no-reply
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=CAFEAcA9oucBm84kep7NHBM1UP6LRdRCfOAS7_buKo_8DTKjeSA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=alistair.francis@xilinx.com \
--cc=alistair23@gmail.com \
--cc=edgar.iglesias@xilinx.com \
--cc=famz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philippe@mathieu-daude.net \
--cc=qemu-block@nongnu.org \
--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).