qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 03/19] avoid dubiously clever code in win32_star


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 03/19] avoid dubiously clever code in win32_start_timer
Date: Mon, 04 Jan 2010 13:34:00 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 12/21/2009 02:09 AM, Paolo Bonzini wrote:
The code is initializing an unsigned int to UINT_MAX using "-1", so that
the following always-true comparison seems to be always-false at a
first look.  Just remove the if.

This really needs a better comment message as at first it wasn't obvious to me that this was correct.

start_timer is only ever called once and as such, the check here is unnecessary. It's not incorrect, it's just more robust than it needs to be.

I'm not sure it's really worth removing to be honest.

Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]