summaryrefslogtreecommitdiff
path: root/networking/wget.c
diff options
context:
space:
mode:
authorPere Orga2011-02-16 20:09:36 +0100
committerDenys Vlasenko2011-02-19 23:56:39 +0100
commit5369563bf9b9b5406714a65f9199aaa0b6b53fef (patch)
treedd51fa2ae5a484176c6c5027d517650bb314bf06 /networking/wget.c
parent582716733895946b2729acdf18a32532567b973a (diff)
downloadbusybox-5369563bf9b9b5406714a65f9199aaa0b6b53fef.zip
busybox-5369563bf9b9b5406714a65f9199aaa0b6b53fef.tar.gz
wget: reduce bloat
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/wget.c')
-rw-r--r--networking/wget.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/networking/wget.c b/networking/wget.c
index ad2bfa4..9d50437 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -556,7 +556,7 @@ static void NOINLINE retrieve_file_data(FILE *dfp)
progress_meter(PROGRESS_END);
}
-static int download_one_url(const char *url)
+static void download_one_url(const char *url)
{
bool use_proxy; /* Use proxies if env vars are set */
int redir_limit;
@@ -853,8 +853,6 @@ However, in real world it was observed that some web servers
free(server.allocated);
free(target.allocated);
free(fname_out_alloc);
-
- return EXIT_SUCCESS;
}
int wget_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -885,7 +883,6 @@ int wget_main(int argc UNUSED_PARAM, char **argv)
;
#endif
- int exitcode;
#if ENABLE_FEATURE_WGET_LONG_OPTIONS
llist_t *headers_llist = NULL;
#endif
@@ -937,12 +934,11 @@ int wget_main(int argc UNUSED_PARAM, char **argv)
G.o_flags = O_WRONLY | O_CREAT | O_TRUNC;
}
- exitcode = 0;
while (*argv)
- exitcode |= download_one_url(*argv++);
+ download_one_url(*argv++);
if (G.output_fd >= 0)
xclose(G.output_fd);
- return exitcode;
+ return EXIT_SUCCESS;
}