]> granicus.if.org Git - curl/commitdiff
opts: Fix some syntax errors in example code fragments
authorMichael Kaufmann <mail@michael-kaufmann.ch>
Tue, 26 Apr 2016 21:51:50 +0000 (23:51 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 26 Apr 2016 22:05:04 +0000 (00:05 +0200)
Fixes #779

docs/libcurl/opts/CURLOPT_CONNECT_TO.3
docs/libcurl/opts/CURLOPT_COOKIELIST.3
docs/libcurl/opts/CURLOPT_RESOLVE.3

index d80336e24ab936c0b49d549c8dc67dc38acba83c..8c59cfbd42bb6e0136faf5f5a32ca735459c09e3 100644 (file)
@@ -83,13 +83,14 @@ All
 .nf
 CURL *curl;
 struct curl_slist *connect_to = NULL;
-host = curl_slist_append(NULL, "example.com::server1.example.com:");
+connect_to = curl_slist_append(NULL, "example.com::server1.example.com:");
 
 curl = curl_easy_init();
 if(curl) {
   curl_easy_setopt(curl, CURLOPT_CONNECT_TO, connect_to);
   curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
-  res = curl_easy_perform(curl);
+
+  curl_easy_perform(curl);
 
   /* always cleanup */
   curl_easy_cleanup(curl);
index 088d2f7686f0184df5acf6ca38615f9c9581eafe..7de4da88243c5909a7aa31989d322a65dba85114 100644 (file)
@@ -100,7 +100,7 @@ were skipped on import are not exported.
 */
 curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "cookies.txt");  /* export */
 
-res = curl_easy_perform(curl);  /* cookies imported from cookies.txt */
+curl_easy_perform(curl);  /* cookies imported from cookies.txt */
 
 curl_easy_cleanup(curl);  /* cookies exported to cookies.txt */
 .fi
index faa5c2604f6d030a5c30f2e65fbf53b36e570fbe..028341ed231c5975c373ebe7c2d1b14b7a6bb8ef 100644 (file)
@@ -67,7 +67,8 @@ curl = curl_easy_init();
 if(curl) {
   curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
   curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
-  res = curl_easy_perform(curl);
+
+  curl_easy_perform(curl);
 
   /* always cleanup */
   curl_easy_cleanup(curl);