diff options
| author | Bartek Rutkowski <robak@FreeBSD.org> | 2017-12-28 22:57:34 +0000 |
|---|---|---|
| committer | Bartek Rutkowski <robak@FreeBSD.org> | 2017-12-28 22:57:34 +0000 |
| commit | e285e32e5615d20b4899c4f82d5c88a81ec49395 (patch) | |
| tree | bf614065f9505a3ad46a171966b713ef72135836 /lib/libutil/humanize_number.c | |
| parent | 0080a8fa9501604a7324872534728b7b72481e37 (diff) | |
Notes
Diffstat (limited to 'lib/libutil/humanize_number.c')
| -rw-r--r-- | lib/libutil/humanize_number.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libutil/humanize_number.c b/lib/libutil/humanize_number.c index 5e8fe3dfd188..e03a9b9ad0ae 100644 --- a/lib/libutil/humanize_number.c +++ b/lib/libutil/humanize_number.c @@ -145,7 +145,8 @@ humanize_number(char *buf, size_t len, int64_t quotient, */ for (i = 0; (quotient >= max || (quotient == max - 1 && - remainder >= divisordeccut)) && i < maxscale; i++) { + (remainder >= divisordeccut || remainder >= + divisor / 2))) && i < maxscale; i++) { remainder = quotient % divisor; quotient /= divisor; } |
