diff options
author | Pere Orga <gotrunks@gmail.com> | 2011-02-16 20:09:36 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-19 23:56:39 +0100 |
commit | 5369563bf9b9b5406714a65f9199aaa0b6b53fef (patch) | |
tree | dd51fa2ae5a484176c6c5027d517650bb314bf06 /networking/wget.c | |
parent | 582716733895946b2729acdf18a32532567b973a (diff) | |
download | busybox-w32-5369563bf9b9b5406714a65f9199aaa0b6b53fef.tar.gz busybox-w32-5369563bf9b9b5406714a65f9199aaa0b6b53fef.tar.bz2 busybox-w32-5369563bf9b9b5406714a65f9199aaa0b6b53fef.zip |
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.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/networking/wget.c b/networking/wget.c index ad2bfa4b5..9d50437d8 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -556,7 +556,7 @@ static void NOINLINE retrieve_file_data(FILE *dfp) | |||
556 | progress_meter(PROGRESS_END); | 556 | progress_meter(PROGRESS_END); |
557 | } | 557 | } |
558 | 558 | ||
559 | static int download_one_url(const char *url) | 559 | static void download_one_url(const char *url) |
560 | { | 560 | { |
561 | bool use_proxy; /* Use proxies if env vars are set */ | 561 | bool use_proxy; /* Use proxies if env vars are set */ |
562 | int redir_limit; | 562 | int redir_limit; |
@@ -853,8 +853,6 @@ However, in real world it was observed that some web servers | |||
853 | free(server.allocated); | 853 | free(server.allocated); |
854 | free(target.allocated); | 854 | free(target.allocated); |
855 | free(fname_out_alloc); | 855 | free(fname_out_alloc); |
856 | |||
857 | return EXIT_SUCCESS; | ||
858 | } | 856 | } |
859 | 857 | ||
860 | int wget_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 858 | int wget_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
@@ -885,7 +883,6 @@ int wget_main(int argc UNUSED_PARAM, char **argv) | |||
885 | ; | 883 | ; |
886 | #endif | 884 | #endif |
887 | 885 | ||
888 | int exitcode; | ||
889 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS | 886 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS |
890 | llist_t *headers_llist = NULL; | 887 | llist_t *headers_llist = NULL; |
891 | #endif | 888 | #endif |
@@ -937,12 +934,11 @@ int wget_main(int argc UNUSED_PARAM, char **argv) | |||
937 | G.o_flags = O_WRONLY | O_CREAT | O_TRUNC; | 934 | G.o_flags = O_WRONLY | O_CREAT | O_TRUNC; |
938 | } | 935 | } |
939 | 936 | ||
940 | exitcode = 0; | ||
941 | while (*argv) | 937 | while (*argv) |
942 | exitcode |= download_one_url(*argv++); | 938 | download_one_url(*argv++); |
943 | 939 | ||
944 | if (G.output_fd >= 0) | 940 | if (G.output_fd >= 0) |
945 | xclose(G.output_fd); | 941 | xclose(G.output_fd); |
946 | 942 | ||
947 | return exitcode; | 943 | return EXIT_SUCCESS; |
948 | } | 944 | } |