mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
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:
parent
ef977865a1
commit
9f96c5433a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user