Skip to content

Commit

Permalink
ftp_parselist: fix compiler warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bagder committed Dec 18, 2010
1 parent 6b5dc72 commit 7f3b87d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ftplistparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7f3b87d

Please sign in to comment.