aboutsummaryrefslogtreecommitdiff
path: root/networking/wget.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-06-18 08:55:57 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-06-18 08:55:57 +0000
commit7679145cfa61e41099645bdeecb6a8c2743c6772 (patch)
treef130799bb1bd2f0721cb832c2dcee92b8d80c2ce /networking/wget.c
parentebd27aabaab98bef2f2d0fe0d7bf4261e5c3ffcd (diff)
downloadbusybox-7679145cfa61e41099645bdeecb6a8c2743c6772.tar.gz
ping: fix write-after-allocated-mem bug
ping: use monotonic_us instead of gettimeofday: smaller code and needs only 4 bytes in the packet ping: display roundtrip times with 1/1000th of ms, not 1/10 ms precision. wget: small optimization function old new delta pingstats 243 259 +16 sendping6 98 93 -5 sendping4 183 178 -5 .rodata 129715 129707 -8 progressmeter 867 855 -12 unpack_tail 320 272 -48 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/5 up/down: 16/-78) Total: -62 bytes
Diffstat (limited to 'networking/wget.c')
-rw-r--r--networking/wget.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 8be37a744..ef27ab058 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -8,7 +8,7 @@
/* We want libc to give us xxx64 functions also */
/* http://www.unix.org/version2/whatsnew/lfs20mar.html */
-#define _LARGEFILE64_SOURCE 1
+//#define _LARGEFILE64_SOURCE 1
#include <getopt.h> /* for struct option */
#include "libbb.h"
@@ -710,7 +710,7 @@ progressmeter(int flag)
fprintf(stderr, "\r%-20.20s%4d%% ", curfile, ratio);
- barlength = getttywidth() - 51;
+ barlength = getttywidth() - 49;
if (barlength > 0) {
/* god bless gcc for variable arrays :) */
i = barlength * ratio / 100;
@@ -728,7 +728,7 @@ progressmeter(int flag)
abbrevsize >>= 10;
}
/* see http://en.wikipedia.org/wiki/Tera */
- fprintf(stderr, "%6d %c%c ", (int)abbrevsize, " KMGTPEZY"[i], i?'B':' ');
+ fprintf(stderr, "%6d%c ", (int)abbrevsize, " kMGTPEZY"[i]);
// Nuts! Ain't it easier to update progress meter ONLY when we transferred++?
// FIXME: get rid of alarmtimer + updateprogressmeter mess