aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/curlgtk.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/curlgtk.c')
-rw-r--r--docs/examples/curlgtk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/examples/curlgtk.c b/docs/examples/curlgtk.c
index df6b419f2..c3129c198 100644
--- a/docs/examples/curlgtk.c
+++ b/docs/examples/curlgtk.c
@@ -50,9 +50,9 @@ void *my_thread(void *ptr)
gchar *url = ptr;
curl = curl_easy_init();
- if(curl)
- {
- outfile = fopen("test.curl", "w");
+ if(curl) {
+ const char *filename = "test.curl";
+ outfile = fopen(filename, "wb");
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
@@ -97,7 +97,7 @@ int main(int argc, char **argv)
gtk_container_add(GTK_CONTAINER(Frame2), Bar);
gtk_widget_show_all(Window);
- if (!g_thread_create(&my_thread, argv[1], FALSE, NULL) != 0)
+ if(!g_thread_create(&my_thread, argv[1], FALSE, NULL) != 0)
g_warning("can't create the thread");