aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-04-16 23:00:21 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-04-16 23:00:21 +0200
commit743bd81e64887644228665642f4c59fd15697371 (patch)
tree185388d38bf51eeb7fe67f7dee71c6803840278b /lib
parent520cee3fb7319eb44d226aaaab9688ae91bc3278 (diff)
ftp_range: Value stored to 'totalsize' is never read
Simplified the code by removing a local variable completely.
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index f821d124d..9460dd9d5 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3285,7 +3285,6 @@ ftp_pasv_verbose(struct connectdata *conn,
static CURLcode ftp_range(struct connectdata *conn)
{
curl_off_t from, to;
- curl_off_t totalsize=-1;
char *ptr;
char *ptr2;
struct SessionHandle *data = conn->data;
@@ -3308,16 +3307,14 @@ static CURLcode ftp_range(struct connectdata *conn)
}
else if(from < 0) {
/* -Y */
- totalsize = -from;
data->req.maxdownload = -from;
data->state.resume_from = from;
DEBUGF(infof(conn->data, "FTP RANGE the last %" FORMAT_OFF_T " bytes\n",
- totalsize));
+ -from));
}
else {
/* X-Y */
- totalsize = to-from;
- data->req.maxdownload = totalsize+1; /* include last byte */
+ data->req.maxdownload = (to-from)+1; /* include last byte */
data->state.resume_from = from;
DEBUGF(infof(conn->data, "FTP RANGE from %" FORMAT_OFF_T
" getting %" FORMAT_OFF_T " bytes\n",