diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-11-20 11:39:29 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-11-20 11:39:29 +0000 |
commit | 4e4695d344952de50dfc7a463584f193faf700fc (patch) | |
tree | 8f2148a7c2b265cc658e509719409b02bbe17a6f /usr.bin | |
parent | cc92bb2df1f0edae1c4710832704308585f403ac (diff) |
fix rounding errors; from andreas@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/progressmeter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/progressmeter.c b/usr.bin/ssh/progressmeter.c index 0520f582fc4..c165e6e6909 100644 --- a/usr.bin/ssh/progressmeter.c +++ b/usr.bin/ssh/progressmeter.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: progressmeter.c,v 1.16 2003/09/23 20:18:52 markus Exp $"); +RCSID("$OpenBSD: progressmeter.c,v 1.17 2003/11/20 11:39:28 markus Exp $"); #include "progressmeter.h" #include "atomicio.h" @@ -79,7 +79,7 @@ format_rate(char *buf, int size, off_t bytes) bytes = (bytes + 512) / 1024; } snprintf(buf, size, "%3lld.%1lld%c%s", - (long long) bytes / 100, + (long long) (bytes + 5) / 100, (long long) (bytes + 5) / 10 % 10, unit[i], i ? "B" : " "); |