aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichael Kaufmann <mail@michael-kaufmann.ch>2016-04-26 23:51:50 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-04-27 00:05:04 +0200
commitf4298fcc6d27e3c7390bd561466e8cd81f4ed8d7 (patch)
tree72a9340a94d97a5016e43ca1d6b94122b703c3f4 /docs
parentab691309cee98d0cd5d7a44d8c8d514de6dfce66 (diff)
opts: Fix some syntax errors in example code fragments
Fixes #779
Diffstat (limited to 'docs')
-rw-r--r--docs/libcurl/opts/CURLOPT_CONNECT_TO.35
-rw-r--r--docs/libcurl/opts/CURLOPT_COOKIELIST.32
-rw-r--r--docs/libcurl/opts/CURLOPT_RESOLVE.33
3 files changed, 6 insertions, 4 deletions
diff --git a/docs/libcurl/opts/CURLOPT_CONNECT_TO.3 b/docs/libcurl/opts/CURLOPT_CONNECT_TO.3
index d80336e24..8c59cfbd4 100644
--- a/docs/libcurl/opts/CURLOPT_CONNECT_TO.3
+++ b/docs/libcurl/opts/CURLOPT_CONNECT_TO.3
@@ -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);
diff --git a/docs/libcurl/opts/CURLOPT_COOKIELIST.3 b/docs/libcurl/opts/CURLOPT_COOKIELIST.3
index 088d2f768..7de4da882 100644
--- a/docs/libcurl/opts/CURLOPT_COOKIELIST.3
+++ b/docs/libcurl/opts/CURLOPT_COOKIELIST.3
@@ -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
diff --git a/docs/libcurl/opts/CURLOPT_RESOLVE.3 b/docs/libcurl/opts/CURLOPT_RESOLVE.3
index faa5c2604..028341ed2 100644
--- a/docs/libcurl/opts/CURLOPT_RESOLVE.3
+++ b/docs/libcurl/opts/CURLOPT_RESOLVE.3
@@ -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);