Explicitly test time difference is greater than zero

We are comparing a floating point number so should use an inequality
rather than implicitly testing != 0.

Prevents warning given by -Wfloat-equal.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2010-12-08 13:51:31 +10:00 committed by Dan McGee
parent ef977865a1
commit 9f96c5433a

View file

@ -352,7 +352,7 @@ void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent,
timediff = get_update_timediff(0); timediff = get_update_timediff(0);
} }
if(percent > 0 && percent < 100 && !timediff) { if(percent > 0 && percent < 100 && timediff > 0) {
/* only update the progress bar when /* only update the progress bar when
* a) we first start * a) we first start
* b) we end the progress * b) we end the progress