diff options
author | Matt Kraai <kraai@debian.org> | 2001-04-11 20:03:01 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2001-04-11 20:03:01 +0000 |
commit | 65317ea27fd048686d4d75a116db3e869b7c0093 (patch) | |
tree | 7765673795aed0d83476837789364162067b4a59 /networking/wget.c | |
parent | ed897e541502045245699f028dfe986abaecf1ba (diff) | |
download | busybox-w32-65317ea27fd048686d4d75a116db3e869b7c0093.tar.gz busybox-w32-65317ea27fd048686d4d75a116db3e869b7c0093.tar.bz2 busybox-w32-65317ea27fd048686d4d75a116db3e869b7c0093.zip |
Fix behavior when extracting to stdout. Report and patch by
Evin Robertson <nitfol@my-deja.com>.
Diffstat (limited to 'networking/wget.c')
-rw-r--r-- | networking/wget.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/wget.c b/networking/wget.c index 79f7e61cf..c416a5862 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -141,7 +141,7 @@ int wget_main(int argc, char **argv) | |||
141 | * this gets interpreted as the auto-gen output filename | 141 | * this gets interpreted as the auto-gen output filename |
142 | * case below - tausq@debian.org | 142 | * case below - tausq@debian.org |
143 | */ | 143 | */ |
144 | fname_out = (strcmp(optarg, "-") == 0 ? (char *)1 : optarg); | 144 | fname_out = optarg; |
145 | break; | 145 | break; |
146 | default: | 146 | default: |
147 | show_usage(); | 147 | show_usage(); |
@@ -188,10 +188,10 @@ int wget_main(int argc, char **argv) | |||
188 | /* | 188 | /* |
189 | * Open the output file stream. | 189 | * Open the output file stream. |
190 | */ | 190 | */ |
191 | if (fname_out != (char *)1) { | 191 | if (strcmp(fname_out, "-") == 0) { |
192 | output = xfopen( fname_out, (do_continue ? "a" : "w") ); | ||
193 | } else { | ||
194 | output = stdout; | 192 | output = stdout; |
193 | } else { | ||
194 | output = xfopen(fname_out, (do_continue ? "a" : "w")); | ||
195 | } | 195 | } |
196 | 196 | ||
197 | /* | 197 | /* |
@@ -732,7 +732,7 @@ progressmeter(int flag) | |||
732 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 732 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
733 | * SUCH DAMAGE. | 733 | * SUCH DAMAGE. |
734 | * | 734 | * |
735 | * $Id: wget.c,v 1.32 2001/04/10 18:17:05 andersen Exp $ | 735 | * $Id: wget.c,v 1.33 2001/04/11 20:03:01 kraai Exp $ |
736 | */ | 736 | */ |
737 | 737 | ||
738 | 738 | ||