mirror of
https://github.com/curl/curl.git
synced 2026-08-25 01:33:31 +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
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue