mirror of
https://github.com/curl/curl.git
synced 2026-07-25 16:27:16 +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
|
|
@ -46,19 +46,18 @@
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
|
||||
curl_mime *form = NULL;
|
||||
curl_mimepart *field = NULL;
|
||||
struct curl_slist *headerlist = NULL;
|
||||
static const char buf[] = "Expect:";
|
||||
|
||||
res = curl_global_init(CURL_GLOBAL_ALL);
|
||||
CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
|
||||
if(res)
|
||||
return (int)res;
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_mime *form = NULL;
|
||||
curl_mimepart *field = NULL;
|
||||
struct curl_slist *headerlist = NULL;
|
||||
static const char buf[] = "Expect:";
|
||||
|
||||
/* Create the form */
|
||||
form = curl_mime_init(curl);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue