diff options
Diffstat (limited to 'docs/examples/curlgtk.c')
-rw-r--r-- | docs/examples/curlgtk.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/examples/curlgtk.c b/docs/examples/curlgtk.c index 35b60da63..4083c8f95 100644 --- a/docs/examples/curlgtk.c +++ b/docs/examples/curlgtk.c @@ -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); |