summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-26 22:20:27 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-26 22:20:27 +0200
commit64ce1c0f51b4d0c07c124071ea2cd8002eccd45d (patch)
treee44cb78c1a11eb7d5221a882c69d6258b516eea7
parent4020ee614cfe248010764028902d80b4a9091f7d (diff)
downloadfastd-64ce1c0f51b4d0c07c124071ea2cd8002eccd45d.tar
fastd-64ce1c0f51b4d0c07c124071ea2cd8002eccd45d.zip
pthread_create returns an error instead of setting errno
-rw-r--r--src/resolve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve.c b/src/resolve.c
index 7c512ee..52729cc 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -126,7 +126,7 @@ void fastd_resolve_peer(fastd_peer_t *peer, fastd_remote_t *remote) {
arg->constraints = remote->config->address;
pthread_t thread;
- if (pthread_create(&thread, NULL, resolve_peer, arg) != 0) {
+ if ((errno = pthread_create(&thread, NULL, resolve_peer, arg)) != 0) {
pr_error_errno("unable to create resolver thread");
free(arg->hostname);