posix: sockets: Fix return value of listen function
If an error happens, listen was returning 1 instead of -1. Signed-off-by: Francois Berder <francois.berder@imgtec.com>
This commit is contained in:
parent
7748dc8ce3
commit
2936a69a1b
@ -752,7 +752,7 @@ int listen(int socket, int backlog)
|
|||||||
bf_unset(_sock_pool_used, _get_sock_idx(sock));
|
bf_unset(_sock_pool_used, _get_sock_idx(sock));
|
||||||
mutex_unlock(&_socket_pool_mutex);
|
mutex_unlock(&_socket_pool_mutex);
|
||||||
}
|
}
|
||||||
return -res;
|
return res;
|
||||||
#else
|
#else
|
||||||
(void)socket;
|
(void)socket;
|
||||||
(void)backlog;
|
(void)backlog;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user