[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v1 2/3] util/oslib-win32: Remove invalid check
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [PATCH v1 2/3] util/oslib-win32: Remove invalid check |
Date: |
Fri, 30 Jun 2017 12:03:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
On 29/06/2017 19:16, Alistair Francis 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 <address@hidden>
> Acked-by: Edgar E. Iglesias <address@hidden>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> Reviewed-by: Fam Zheng <address@hidden>
> ---
>
> 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;
> }
>
Can you explain this better?
Paolo