aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-02-10 09:55:05 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-02-10 09:55:05 +0100
commit0fac2f7b5b0bacf2c1ad73215acb312e012f0227 (patch)
tree69f0a41d4f3654262f7c8aa46b7ba4bdfe8db00b /networking
parente3ece7878bff0a32a992c1f5f340ad223c009679 (diff)
downloadbusybox-0fac2f7b5b0bacf2c1ad73215acb312e012f0227.tar.gz
wget: remove functions which retry on EINTR
function old new delta retrieve_file_data 392 353 -39 safe_fgets 58 - -58 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-97) Total: -97 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/wget.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 8e636bd39..8028f1230 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -128,6 +128,7 @@ static void strip_ipv6_scope_id(char *host)
overlapping_strcpy(scope, cp);
}
+#if 0 /* were needed when we used signal-driven progress bar */
/* Read NMEMB bytes into PTR from STREAM. Returns the number of bytes read,
* and a short count if an eof or non-interrupt error is encountered. */
static size_t safe_fread(void *ptr, size_t nmemb, FILE *stream)
@@ -160,6 +161,7 @@ static char *safe_fgets(char *s, int size, FILE *stream)
return ret;
}
+#endif
#if ENABLE_FEATURE_WGET_AUTHENTICATION
/* Base64-encode character string. */
@@ -495,7 +497,7 @@ static void NOINLINE retrieve_file_data(FILE *dfp, int output_fd)
progress_meter(PROGRESS_BUMP);
}
#endif
- n = safe_fread(G.wget_buf, rdsz, dfp);
+ n = fread(G.wget_buf, 1, rdsz, dfp);
if (n <= 0) {
if (ferror(dfp)) {
/* perror will not work: ferror doesn't set errno */
@@ -515,9 +517,9 @@ static void NOINLINE retrieve_file_data(FILE *dfp, int output_fd)
if (!G.chunked)
break;
- safe_fgets(G.wget_buf, sizeof(G.wget_buf), dfp); /* This is a newline */
+ fgets(G.wget_buf, sizeof(G.wget_buf), dfp); /* This is a newline */
get_clen:
- safe_fgets(G.wget_buf, sizeof(G.wget_buf), dfp);
+ fgets(G.wget_buf, sizeof(G.wget_buf), dfp);
G.content_len = STRTOOFF(G.wget_buf, NULL, 16);
/* FIXME: error check? */
if (G.content_len == 0)