From: mvs Date: Mon, 23 Jan 2023 18:33:34 +0000 (+0000) Subject: In somove() rename `state' variable to `rcvstate' to make code more X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=193d84458b156c38be4e40758063dfa1fb0523fb;p=openbsd In somove() rename `state' variable to `rcvstate' to make code more readable. No functional changes. Proposed by and ok bluhm@ --- diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index fdb140e4b49..b5ca9eab359 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.295 2023/01/22 12:05:44 mvs Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.296 2023/01/23 18:33:34 mvs Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -1458,7 +1458,7 @@ somove(struct socket *so, int wait) u_long len, off, oobmark; long space; int error = 0, maxreached = 0; - unsigned int state; + unsigned int rcvstate; soassertlocked(so); @@ -1634,7 +1634,7 @@ somove(struct socket *so, int wait) pru_rcvd(so); /* Receive buffer did shrink by len bytes, adjust oob. */ - state = so->so_rcv.sb_state; + rcvstate = so->so_rcv.sb_state; so->so_rcv.sb_state &= ~SS_RCVATMARK; oobmark = so->so_oobmark; so->so_oobmark = oobmark > len ? oobmark - len : 0; @@ -1649,13 +1649,13 @@ somove(struct socket *so, int wait) * Handle oob data. If any malloc fails, ignore error. * TCP urgent data is not very reliable anyway. */ - while (((state & SS_RCVATMARK) || oobmark) && + while (((rcvstate & SS_RCVATMARK) || oobmark) && (so->so_options & SO_OOBINLINE)) { struct mbuf *o = NULL; - if (state & SS_RCVATMARK) { + if (rcvstate & SS_RCVATMARK) { o = m_get(wait, MT_DATA); - state &= ~SS_RCVATMARK; + rcvstate &= ~SS_RCVATMARK; } else if (oobmark) { o = m_split(m, oobmark, wait); if (o) { @@ -1689,7 +1689,7 @@ somove(struct socket *so, int wait) if (oobmark) { oobmark -= 1; if (oobmark == 0) - state |= SS_RCVATMARK; + rcvstate |= SS_RCVATMARK; } m_adj(m, 1); }