Commit a22ad9fd1f1f938fb9b8ac77939dda8a3b81a00e

Vicent Martí 2013-01-10T06:01:00

Merge pull request #1219 from sba1/fetch-example-return-fix Don't call pthread_exit() in the callback of the fetch example

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/examples/network/fetch.c b/examples/network/fetch.c
index 437b137..416788b 100644
--- a/examples/network/fetch.c
+++ b/examples/network/fetch.c
@@ -42,7 +42,7 @@ static void *download(void *ptr)
 
 exit:
 	data->finished = 1;
-	pthread_exit(&data->ret);
+	return &data->ret;
 }
 
 static int update_cb(const char *refname, const git_oid *a, const git_oid *b, void *data)