summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-12-08 04:51:31 +0100
committerDan McGee <dan@archlinux.org>2010-12-13 03:32:32 +0100
commit9f96c5433a4867cce9dc0c3ff23cb3ba8029be20 (patch)
tree55af7d9494ef188d966c670668a9a1e5b5053559 /src
parentef977865a143eb682baf0d4f598c0c6924aeaa1a (diff)
downloadpacman-9f96c5433a4867cce9dc0c3ff23cb3ba8029be20.tar.gz
pacman-9f96c5433a4867cce9dc0c3ff23cb3ba8029be20.tar.xz
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>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c2
1 files changed, 1 insertions, 1 deletions
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