mirror of
https://github.com/neocturne/fastd.git
synced 2025-05-15 12:45:09 +02:00
pthread_create returns an error instead of setting errno
This commit is contained in:
parent
4020ee614c
commit
64ce1c0f51
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ void fastd_resolve_peer(fastd_peer_t *peer, fastd_remote_t *remote) {
|
||||||
arg->constraints = remote->config->address;
|
arg->constraints = remote->config->address;
|
||||||
|
|
||||||
pthread_t thread;
|
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");
|
pr_error_errno("unable to create resolver thread");
|
||||||
|
|
||||||
free(arg->hostname);
|
free(arg->hostname);
|
||||||
|
|
Loading…
Add table
Reference in a new issue