diff options
Diffstat (limited to 'docs/examples/ftpgetinfo.c')
-rw-r--r-- | docs/examples/ftpgetinfo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/examples/ftpgetinfo.c b/docs/examples/ftpgetinfo.c index c4e234f18..95c6f8ac8 100644 --- a/docs/examples/ftpgetinfo.c +++ b/docs/examples/ftpgetinfo.c @@ -21,6 +21,8 @@ static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data) { + (void)ptr; + (void)data; /* we are not interested in the headers itself, so we only return the size we would have saved ... */ return (size_t)(size * nmemb); @@ -58,7 +60,7 @@ int main(void) if((CURLE_OK == res) && filetime) printf("filetime %s: %s", filename, ctime(&filetime)); res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize); - if((CURLE_OK == res) && filesize) + if((CURLE_OK == res) && (filesize>0)) printf("filesize %s: %0.0f bytes\n", filename, filesize); } else { /* we failed */ |