aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-03-12 08:03:31 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-03-12 08:03:31 +0000
commit9af532e6624dc9d61ce025a6d114102eecfb5eec (patch)
treedf46d0fd7ddf38ff3a90f54d4944f91c985d2889 /src/main.c
parent9d064a392732099187ef9e4dcc7c6bd3f9cfede1 (diff)
David Byron's fix to clear outs.filename
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 419a79301..ea71c3510 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 */
}
}