From 86039057f89421938d067348388669e0b407ac65 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 28 Feb 2024 10:30:23 +0800 Subject: [PATCH] net/local: Remove the unused lc_psock from local_conn_s Signed-off-by: Xiang Xiao --- net/local/local.h | 1 - net/local/local_accept.c | 2 -- net/local/local_sockif.c | 3 --- 3 files changed, 6 deletions(-) diff --git a/net/local/local.h b/net/local/local.h index ad74deb212..7b6abc764b 100644 --- a/net/local/local.h +++ b/net/local/local.h @@ -143,7 +143,6 @@ struct local_conn_s /* SOCK_STREAM fields common to both client and server */ sem_t lc_waitsem; /* Use to wait for a connection to be accepted */ - FAR struct socket *lc_psock; /* A reference to the socket structure */ /* The following is a list if poll structures of threads waiting for * socket events. diff --git a/net/local/local_accept.c b/net/local/local_accept.c index 387996a324..afad5ee57a 100644 --- a/net/local/local_accept.c +++ b/net/local/local_accept.c @@ -150,8 +150,6 @@ int local_accept(FAR struct socket *psock, FAR struct sockaddr *addr, /* Setup the accpet socket structure */ - conn->lc_psock = newsock; - newsock->s_domain = psock->s_domain; newsock->s_type = SOCK_STREAM; newsock->s_sockif = psock->s_sockif; diff --git a/net/local/local_sockif.c b/net/local/local_sockif.c index e40be55151..0b57ba0049 100644 --- a/net/local/local_sockif.c +++ b/net/local/local_sockif.c @@ -148,9 +148,6 @@ static int local_sockif_alloc(FAR struct socket *psock) /* Save the pre-allocated connection in the socket structure */ psock->s_conn = conn; -#if defined(CONFIG_NET_LOCAL_STREAM) - conn->lc_psock = psock; -#endif return OK; } #endif