From 9f96c5433a4867cce9dc0c3ff23cb3ba8029be20 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 8 Dec 2010 13:51:31 +1000 Subject: 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 Signed-off-by: Dan McGee --- src/pacman/callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/pacman/callback.c b/src/pacman/callback.c index f585b284..c8f604fc 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -352,7 +352,7 @@ void cb_trans_progress(pmtransprog_t event, const char *pkgname, int percent, timediff = get_update_timediff(0); } - if(percent > 0 && percent < 100 && !timediff) { + if(percent > 0 && percent < 100 && timediff > 0) { /* only update the progress bar when * a) we first start * b) we end the progress -- cgit v1.2.3-24-g4f1b