From: Eric Andersen Date: Wed, 31 Jan 2001 17:49:47 +0000 (-0000) Subject: Patch from Vladimir N. Oleynik to simplify wget file opening X-Git-Tag: 0_50~270 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=79e898ac0e46d658f7edcbcb48e5bd0d578b6380;p=oweals%2Fbusybox.git Patch from Vladimir N. Oleynik to simplify wget file opening using xfopen (which is what everything should be using). --- diff --git a/networking/wget.c b/networking/wget.c index 438ecba2e..729c6fdc7 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -167,8 +167,7 @@ int wget_main(int argc, char **argv) * Open the output file stream. */ if (fname_out != (char *)1) { - if ( (output=fopen(fname_out, (do_continue ? "a" : "w"))) == NULL) - perror_msg_and_die("fopen(%s)", fname_out); + output = xfopen( fname_out, (do_continue ? "a" : "w") ); } else { output = stdout; } @@ -533,7 +532,7 @@ progressmeter(int flag) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: wget.c,v 1.23 2001/01/27 08:24:38 andersen Exp $ + * $Id: wget.c,v 1.24 2001/01/31 17:49:47 andersen Exp $ */ diff --git a/wget.c b/wget.c index 438ecba2e..729c6fdc7 100644 --- a/wget.c +++ b/wget.c @@ -167,8 +167,7 @@ int wget_main(int argc, char **argv) * Open the output file stream. */ if (fname_out != (char *)1) { - if ( (output=fopen(fname_out, (do_continue ? "a" : "w"))) == NULL) - perror_msg_and_die("fopen(%s)", fname_out); + output = xfopen( fname_out, (do_continue ? "a" : "w") ); } else { output = stdout; } @@ -533,7 +532,7 @@ progressmeter(int flag) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: wget.c,v 1.23 2001/01/27 08:24:38 andersen Exp $ + * $Id: wget.c,v 1.24 2001/01/31 17:49:47 andersen Exp $ */