summaryrefslogtreecommitdiff
path: root/docs/examples/shared-connection-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/shared-connection-cache.c')
-rw-r--r--docs/examples/shared-connection-cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/examples/shared-connection-cache.c b/docs/examples/shared-connection-cache.c
index 91864d9b2..639ad9c54 100644
--- a/docs/examples/shared-connection-cache.c
+++ b/docs/examples/shared-connection-cache.c
@@ -46,8 +46,6 @@ static void my_unlock(CURL *handle, curl_lock_data data, void *useptr)
int main(void)
{
- CURL *curl;
- CURLcode res;
CURLSH *share;
int i;
@@ -61,8 +59,10 @@ int main(void)
still reuse connections since the pool is in the shared object! */
for(i = 0; i < 3; i++) {
- curl = curl_easy_init();
+ CURL *curl = curl_easy_init();
if(curl) {
+ CURLcode res;
+
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.haxx.se/");
/* use the share object */