From: Daniel Stenberg Date: Fri, 12 Mar 2004 08:03:31 +0000 (+0000) Subject: David Byron's fix to clear outs.filename X-Git-Tag: upstream/7.37.1~13194 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9af532e6624dc9d61ce025a6d114102eecfb5eec;p=platform%2Fupstream%2Fcurl.git David Byron's fix to clear outs.filename --- diff --git a/src/main.c b/src/main.c index 419a793..ea71c35 100644 --- a/src/main.c +++ b/src/main.c @@ -2642,6 +2642,8 @@ operate(struct Configurable *config, int argc, char *argv[]) } #endif + memset(&outs,0,sizeof(outs)); + /* we get libcurl info right away */ curlinfo = curl_version_info(CURLVERSION_NOW); @@ -2946,6 +2948,8 @@ operate(struct Configurable *config, int argc, char *argv[]) config->resume_from = 0; } + outs.filename = outfile; + if(config->resume_from) { /* open file for output: */ outs.stream=(FILE *) fopen(outfile, config->resume_from?"ab":"wb"); @@ -2955,7 +2959,6 @@ operate(struct Configurable *config, int argc, char *argv[]) } } else { - outs.filename = outfile; outs.stream = NULL; /* open when needed */ } }