On 06/15/2010 07:27 PM, Richard Henderson wrote:
On 06/15/2010 02:28 PM, Anthony Liguori wrote:
On 06/15/2010 04:03 PM, Stefan Weil wrote:
Comparing an 8 bit value with ~0 does not work as expected.
Replace ~0 by UINT8_MAX in comparison and also in assignment
(and fix coding style, too).

Because when the uint8_t gets promoted, it doesn't get zero filled.  I'd
rather something a bit more obvious like HPET_INVALID_COUNT.
Er, yes it does.  The problem is that it *did* get zero-extended,
but ~0 is 0xffffffff, so the comparison fails.

Typo on my part.  I meant one filled obviously.

Regards,

Anthony Liguori

But I really agree with Jan Kiszka down-thread -- why do we need
to signal this as a special case at all?


r~


Reply via email to