examples: reduce variable scopes

Closes https://github.com/curl/curl/pull/3919
This commit is contained in:
Marcel Raad 2019-05-21 10:44:16 +02:00
parent 918987a844
commit 10b7067eb7
No known key found for this signature in database
GPG key ID: 33C416EFAE4D6F02
11 changed files with 51 additions and 51 deletions

View file

@ -45,13 +45,12 @@ int my_progress_func(GtkWidget *bar,
void *my_thread(void *ptr)
{
CURL *curl;
FILE *outfile;
gchar *url = ptr;
curl = curl_easy_init();
if(curl) {
gchar *url = ptr;
const char *filename = "test.curl";
outfile = fopen(filename, "wb");
FILE *outfile = fopen(filename, "wb");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);