Loading docs/examples/certinfo.c +4 −1 Original line number Diff line number Diff line Loading @@ -9,9 +9,12 @@ static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream) { (void)stream; (void)ptr; return size * nmemb; } int main(int argc, char **argv) int main(void) { CURL *curl; CURLcode res; Loading docs/examples/debug.c +2 −2 Original line number Diff line number Diff line Loading @@ -28,12 +28,12 @@ void dump(const char *text, /* without the hex output, we can fit more on screen */ width = 0x40; fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n", fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n", text, (long)size, (long)size); for(i=0; i<size; i+= width) { fprintf(stream, "%04.4lx: ", (long)i); fprintf(stream, "%4.4lx: ", (long)i); if(!nohex) { /* hex not disabled, show it */ Loading docs/examples/ftpgetinfo.c +3 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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 */ Loading docs/examples/ftpgetresp.c +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ write_response(void *ptr, size_t size, size_t nmemb, void *data) return fwrite(ptr, size, nmemb, writehere); } int main(int argc, char **argv) int main(void) { CURL *curl; CURLcode res; Loading docs/examples/ftpupload.c +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) return retcode; } int main(int argc, char **argv) int main(void) { CURL *curl; CURLcode res; Loading Loading
docs/examples/certinfo.c +4 −1 Original line number Diff line number Diff line Loading @@ -9,9 +9,12 @@ static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream) { (void)stream; (void)ptr; return size * nmemb; } int main(int argc, char **argv) int main(void) { CURL *curl; CURLcode res; Loading
docs/examples/debug.c +2 −2 Original line number Diff line number Diff line Loading @@ -28,12 +28,12 @@ void dump(const char *text, /* without the hex output, we can fit more on screen */ width = 0x40; fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n", fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n", text, (long)size, (long)size); for(i=0; i<size; i+= width) { fprintf(stream, "%04.4lx: ", (long)i); fprintf(stream, "%4.4lx: ", (long)i); if(!nohex) { /* hex not disabled, show it */ Loading
docs/examples/ftpgetinfo.c +3 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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 */ Loading
docs/examples/ftpgetresp.c +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ write_response(void *ptr, size_t size, size_t nmemb, void *data) return fwrite(ptr, size, nmemb, writehere); } int main(int argc, char **argv) int main(void) { CURL *curl; CURLcode res; Loading
docs/examples/ftpupload.c +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) return retcode; } int main(int argc, char **argv) int main(void) { CURL *curl; CURLcode res; Loading