mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 17:31:46 -05:00
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.
This commit is contained in:
parent
6b5dc72575
commit
7f3b87d878
@ -447,9 +447,10 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
|
|||||||
else if(c == '\n') {
|
else if(c == '\n') {
|
||||||
finfo->b_data[parser->item_length - 1] = 0;
|
finfo->b_data[parser->item_length - 1] = 0;
|
||||||
if(strncmp("total ", finfo->b_data, 6) == 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 */
|
/* here we can deal with directory size */
|
||||||
curlx_strtoofft(finfo->b_data+6, &endptr, 10);
|
while(ISSPACE(*endptr))
|
||||||
|
endptr++;
|
||||||
if(*endptr != 0) {
|
if(*endptr != 0) {
|
||||||
PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST);
|
PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST);
|
||||||
return bufflen;
|
return bufflen;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user