diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-04-02 18:27:48 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-04-02 18:27:48 +0000 |
commit | 90eedd27c3a97bd92f33625886a445649b095581 (patch) | |
tree | e466a34625f18500f67743a0d187c5dd5797da23 /sys/netinet/udp_usrreq.c | |
parent | 34b4957cdf0004f97087b7b2fad30c95f3a72100 (diff) |
Use macros sotoinpcb() and intotcpcb() instead of casts. Use NULL
instead of 0 for pointers. No binary change.
OK mpi@
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index f5c1c094c94..6aa01777569 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_usrreq.c,v 1.157 2013/03/31 11:18:35 bluhm Exp $ */ +/* $OpenBSD: udp_usrreq.c,v 1.158 2013/04/02 18:27:47 bluhm Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */ /* @@ -1160,12 +1160,11 @@ udp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr, } splx(s); #ifdef INET6 - if (((struct inpcb *)so->so_pcb)->inp_flags & INP_IPV6) - ((struct inpcb *) so->so_pcb)->inp_ipv6.ip6_hlim = - ip6_defhlim; + if (sotoinpcb(so)->inp_flags & INP_IPV6) + sotoinpcb(so)->inp_ipv6.ip6_hlim = ip6_defhlim; else #endif /* INET6 */ - ((struct inpcb *) so->so_pcb)->inp_ip.ip_ttl = ip_defttl; + sotoinpcb(so)->inp_ip.ip_ttl = ip_defttl; break; case PRU_DETACH: |