mirror of
https://github.com/curl/curl.git
synced 2026-07-15 21:07:18 +03:00
examples: reduce variable scopes
Closes https://github.com/curl/curl/pull/3919
This commit is contained in:
parent
918987a844
commit
10b7067eb7
11 changed files with 51 additions and 51 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue