mirror of
https://github.com/curl/curl.git
synced 2026-08-03 22:40:29 +03:00
examples: check more errors, fix cleanups, scope variables
Inspired by Joshua's report on examples. Closes #19055
This commit is contained in:
parent
61dcb56743
commit
64ed2ea196
42 changed files with 874 additions and 785 deletions
|
|
@ -30,8 +30,7 @@
|
|||
* in a separate file using our own callback!
|
||||
* </DESC>
|
||||
*/
|
||||
static size_t
|
||||
write_response(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
static size_t write_response(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
{
|
||||
FILE *writehere = (FILE *)data;
|
||||
return fwrite(ptr, size, nmemb, writehere);
|
||||
|
|
@ -88,5 +87,7 @@ int main(void)
|
|||
fclose(ftpfile); /* close the local file */
|
||||
fclose(respfile); /* close the response file */
|
||||
|
||||
curl_global_cleanup();
|
||||
|
||||
return (int)res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue