On 01/04/2010 08:34 PM, Anthony Liguori wrote:
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.

I didn't like the comparison with -1 being always true. I'll update with a comment.

Paolo


Reply via email to