From 34b403920275f84339f0382d7d0b4a04f6d524f5 Mon Sep 17 00:00:00 2001 From: rwatson Date: Tue, 2 Sep 2008 16:55:21 +0000 Subject: [PATCH] Remove XXXRW in soreceive_dgram that proves unnecessary. Remove unused orig_resid variable in soreceive_dgram. Submitted by: alfred X-MFC with: soreceive_dgram (r180198, r180211) --- sys/kern/uipc_socket.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 58d112583861..217918c411e9 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1857,7 +1857,6 @@ soreceive_dgram(struct socket *so, struct sockaddr **psa, struct uio *uio, int flags, len, error, offset; struct protosw *pr = so->so_proto; struct mbuf *nextrecord; - int orig_resid = uio->uio_resid; if (psa != NULL) *psa = NULL; @@ -1935,7 +1934,6 @@ soreceive_dgram(struct socket *so, struct sockaddr **psa, struct uio *uio, SBLASTRECORDCHK(&so->so_rcv); SBLASTMBUFCHK(&so->so_rcv); - /* XXXRW: sbwait() may not be as happy without sblock(). */ error = sbwait(&so->so_rcv); SOCKBUF_UNLOCK(&so->so_rcv); if (error) @@ -1968,7 +1966,6 @@ soreceive_dgram(struct socket *so, struct sockaddr **psa, struct uio *uio, if (pr->pr_flags & PR_ADDR) { KASSERT(m->m_type == MT_SONAME, ("m->m_type == %d", m->m_type)); - orig_resid = 0; if (psa != NULL) *psa = sodupsockaddr(mtod(m, struct sockaddr *), M_NOWAIT); @@ -2048,13 +2045,11 @@ soreceive_dgram(struct socket *so, struct sockaddr **psa, struct uio *uio, else m_freem(cm); if (controlp != NULL) { - orig_resid = 0; while (*controlp != NULL) controlp = &(*controlp)->m_next; } cm = cmn; } - orig_resid = 0; /* XXXRW: why this? */ } KASSERT(m->m_type == MT_DATA, ("soreceive_dgram: !data"));