mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
Ensure psock_socket and psock_accept initialize s_crefs to 1
This simplifies the caller usage
This commit is contained in:
@@ -879,6 +879,7 @@ static int inet_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
|
||||
|
||||
/* Initialize the socket structure. */
|
||||
|
||||
newsock->s_crefs = 1;
|
||||
newsock->s_domain = psock->s_domain;
|
||||
newsock->s_type = SOCK_STREAM;
|
||||
newsock->s_sockif = psock->s_sockif;
|
||||
|
||||
Reference in New Issue
Block a user