diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-07-15 23:10:00 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-07-15 23:10:00 +0000 |
commit | 43b29064f0093e5c798579226122d29284b99193 (patch) | |
tree | 15a9ce74161d59137bf81ce9b1c9b8b26b123b57 /sys/netinet/raw_ip.c | |
parent | b67a0bee64f0777c2caf02893881804624c9da2f (diff) |
use mp for the name of a variable of type struct mbuf **, rather than m
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r-- | sys/netinet/raw_ip.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 5fe8fc95742..96038f7461f 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip.c,v 1.82 2015/07/15 22:16:42 deraadt Exp $ */ +/* $OpenBSD: raw_ip.c,v 1.83 2015/07/15 23:09:59 deraadt Exp $ */ /* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */ /* @@ -294,7 +294,7 @@ rip_output(struct mbuf *m, ...) */ int rip_ctloutput(int op, struct socket *so, int level, int optname, - struct mbuf **m) + struct mbuf **mp) { struct inpcb *inp = sotoinpcb(so); int error = 0; @@ -302,7 +302,7 @@ rip_ctloutput(int op, struct socket *so, int level, int optname, if (level != IPPROTO_IP) { if (op == PRCO_SETOPT) - (void) m_free(*m); + (void) m_free(*mp); return (EINVAL); } @@ -311,29 +311,29 @@ rip_ctloutput(int op, struct socket *so, int level, int optname, case IP_HDRINCL: error = 0; if (op == PRCO_SETOPT) { - if (*m == NULL || (*m)->m_len < sizeof (int)) + if (*mp == NULL || (*mp)->m_len < sizeof (int)) error = EINVAL; - else if (*mtod(*m, int *)) + else if (*mtod(*mp, int *)) inp->inp_flags |= INP_HDRINCL; else inp->inp_flags &= ~INP_HDRINCL; - if (*m) - (void)m_free(*m); + if (*mp) + (void)m_free(*mp); } else { - *m = m_get(M_WAIT, M_SOOPTS); - (*m)->m_len = sizeof(int); - *mtod(*m, int *) = inp->inp_flags & INP_HDRINCL; + *mp = m_get(M_WAIT, M_SOOPTS); + (*mp)->m_len = sizeof(int); + *mtod(*mp, int *) = inp->inp_flags & INP_HDRINCL; } return (error); case IP_DIVERTFL: switch (op) { case PRCO_SETOPT: - if (*m == NULL || (*m)->m_len < sizeof (int)) { + if (*mp == NULL || (*mp)->m_len < sizeof (int)) { error = EINVAL; break; } - dir = *mtod(*m, int *); + dir = *mtod(*mp, int *); if (inp->inp_divertfl > 0) error = ENOTSUP; else if ((dir & IPPROTO_DIVERT_RESP) || @@ -345,9 +345,9 @@ rip_ctloutput(int op, struct socket *so, int level, int optname, break; case PRCO_GETOPT: - *m = m_get(M_WAIT, M_SOOPTS); - (*m)->m_len = sizeof(int); - *mtod(*m, int *) = inp->inp_divertfl; + *mp = m_get(M_WAIT, M_SOOPTS); + (*mp)->m_len = sizeof(int); + *mtod(*mp, int *) = inp->inp_divertfl; break; default: @@ -356,7 +356,7 @@ rip_ctloutput(int op, struct socket *so, int level, int optname, } if (op == PRCO_SETOPT) - (void)m_free(*m); + (void)m_free(*mp); return (error); case MRT_INIT: @@ -372,10 +372,10 @@ rip_ctloutput(int op, struct socket *so, int level, int optname, #ifdef MROUTING switch (op) { case PRCO_SETOPT: - error = ip_mrouter_set(so, optname, m); + error = ip_mrouter_set(so, optname, mp); break; case PRCO_GETOPT: - error = ip_mrouter_get(so, optname, m); + error = ip_mrouter_get(so, optname, mp); break; default: error = EINVAL; @@ -384,11 +384,11 @@ rip_ctloutput(int op, struct socket *so, int level, int optname, return (error); #else if (op == PRCO_SETOPT) - m_free(*m); + m_free(*mp); return (EOPNOTSUPP); #endif } - return (ip_ctloutput(op, so, level, optname, m)); + return (ip_ctloutput(op, so, level, optname, mp)); } u_long rip_sendspace = RIPSNDQ; |