aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-03-13 13:13:19 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-03-13 13:13:19 +0000
commit76fe69b133f2b9b96cd08da409496e36dc75796e (patch)
tree0a84aaf866dc378d99381de29485ef14fdd83ae5 /lib
parente1bae4fc7e3c565ea4ccd8a61b68f2f68c9a931d (diff)
no longer attempts to SIZE a NULL pointer, as that wasn't very clever
(but didn't crash or anything)
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 92f62638e..7b269ef5a 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1504,7 +1504,7 @@ CURLcode ftp_perform(struct connectdata *conn)
{
/* this is FTP and no proxy */
ssize_t nread;
- CURLcode result;
+ CURLcode result=CURLE_OK;
struct SessionHandle *data=conn->data;
char *buf = data->state.buffer; /* this is our buffer */
@@ -1544,7 +1544,7 @@ CURLcode ftp_perform(struct connectdata *conn)
/* If we have selected NOBODY and HEADER, it means that we only want file
information. Which in FTP can't be much more than the file size and
date. */
- if(data->set.no_body && data->set.include_header) {
+ if(data->set.no_body && data->set.include_header && ftp->file) {
/* The SIZE command is _not_ RFC 959 specified, and therefor many servers
may not support it! It is however the only way we have to get a file's
size! */