summaryrefslogtreecommitdiff
path: root/lib/ftplistparser.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-12-19 00:15:12 +0100
committerDaniel Stenberg <daniel@haxx.se>2010-12-19 00:15:12 +0100
commit7f3b87d8782eae1803b9658e14788f5dcbb3aa6b (patch)
treec4fe16612c550df5dd27d4cb0f46f11fb92267fd /lib/ftplistparser.c
parent6b5dc725756984da68da5c3866c6bb8ef10527cb (diff)
downloadcurl-7f3b87d8782eae1803b9658e14788f5dcbb3aa6b.tar.gz
ftp_parselist: fix compiler warning
Doing curlx_strtoofft() on the size just to figure out the end of it causes a compiler warning since the result wasn't used, but is also a bit of a waste.
Diffstat (limited to 'lib/ftplistparser.c')
-rw-r--r--lib/ftplistparser.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c
index c59ea7e16..6f7475337 100644
--- a/lib/ftplistparser.c
+++ b/lib/ftplistparser.c
@@ -447,9 +447,10 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
else if(c == '\n') {
finfo->b_data[parser->item_length - 1] = 0;
if(strncmp("total ", finfo->b_data, 6) == 0) {
- char *endptr = NULL;
+ char *endptr = finfo->b_data+6;
/* here we can deal with directory size */
- curlx_strtoofft(finfo->b_data+6, &endptr, 10);
+ while(ISSPACE(*endptr))
+ endptr++;
if(*endptr != 0) {
PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST);
return bufflen;