Ensure psock_socket and psock_accept initialize s_crefs to 1

This simplifies the caller usage
This commit is contained in:
Xiang Xiao
2020-01-31 17:27:46 +08:00
committed by Gregory Nutt
parent 9f9566c0eb
commit 0b860726db
7 changed files with 4 additions and 14 deletions
-2
View File
@@ -119,9 +119,7 @@ static void vnc_reset_session(FAR struct vnc_session_s *session,
/* [Re-]initialize the session. */
memset(&session->connect, 0, sizeof(struct socket));
session->connect.s_crefs = 1;
memset(&session->listen, 0, sizeof(struct socket));
session->listen.s_crefs = 1;
/* Put all of the pre-allocated update structures into the freelist */