.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);
*/
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
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);