diff options
Diffstat (limited to 'hw/hpet.c')
-rw-r--r-- | hw/hpet.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -157,14 +157,14 @@ static inline uint64_t hpet_calculate_diff(HPETTimer *t, uint64_t current) cmp = (uint32_t)t->cmp; diff = cmp - (uint32_t)current; - diff = (int32_t)diff > 0 ? diff : (uint32_t)0; + diff = (int32_t)diff > 0 ? diff : (uint32_t)1; return (uint64_t)diff; } else { uint64_t diff, cmp; cmp = t->cmp; diff = cmp - current; - diff = (int64_t)diff > 0 ? diff : (uint64_t)0; + diff = (int64_t)diff > 0 ? diff : (uint64_t)1; return diff; } } |