summaryrefslogtreecommitdiff
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
parentf96d18362d4d1702e804473465601c2d316f5e52 (diff)
- (djm) OpenBSD CVS Sync
- markus@cvs.openbsd.org 2003/11/20 11:39:28 [progressmeter.c] fix rounding errors; from andreas@
-rw-r--r--ChangeLog8
-rw-r--r--progressmeter.c4
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f3ab7cfb..8a978ec0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+20031121
+ - (djm) OpenBSD CVS Sync
+ - markus@cvs.openbsd.org 2003/11/20 11:39:28
+ [progressmeter.c]
+ fix rounding errors; from andreas@
+
20031118
- (djm) Fix early exit for root auth success when UsePAM=yes and
PermitRootLogin=no
@@ -1488,4 +1494,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
-$Id: ChangeLog,v 1.3117 2003/11/18 11:01:48 djm Exp $
+$Id: ChangeLog,v 1.3118 2003/11/21 12:09:10 djm Exp $
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" : " ");