summaryrefslogtreecommitdiff
path: root/progressmeter.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-11-21 23:09:10 +1100
committerDamien Miller <djm@mindrot.org>2003-11-21 23:09:10 +1100
commit8c5e91c03fdd2693f0635f8b2a9904bffc94ce16 (patch)
treea8fa30f4fa3c57e41761e4d8ead4640c7f071cc3 /progressmeter.c
parentf96d18362d4d1702e804473465601c2d316f5e52 (diff)
downloadopenssh-git-8c5e91c03fdd2693f0635f8b2a9904bffc94ce16.tar.gz
- (djm) OpenBSD CVS Sync
- markus@cvs.openbsd.org 2003/11/20 11:39:28 [progressmeter.c] fix rounding errors; from andreas@
Diffstat (limited to 'progressmeter.c')
-rw-r--r--progressmeter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/progressmeter.c b/progressmeter.c
index a244acf9..39940bd9 100644
--- a/progressmeter.c
+++ b/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"
@@ -80,7 +80,7 @@ format_rate(char *buf, int size, off_t bytes)
bytes = (bytes + 512) / 1024;
}
snprintf(buf, size, "%3lld.%1lld%c%s",
- (int64_t) bytes / 100,
+ (int64_t) (bytes + 5) / 100,
(int64_t) (bytes + 5) / 10 % 10,
unit[i],
i ? "B" : " ");