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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue