diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-10-23 00:15:08 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-10-23 00:15:08 +0000 |
commit | b67fc55fe53cc0f33a590e4a97732642c6a5ac29 (patch) | |
tree | e22bb584f6d5fdb676a8f7cf46c83cb1a74408f1 /sys/netinet6/ip6_input.c | |
parent | d3634839e7c6589a2e764e0fc9e65df9021c6641 (diff) |
replace pointer arithmetic and casts with offsetof
ok mpi@ bluhm@
Diffstat (limited to 'sys/netinet6/ip6_input.c')
-rw-r--r-- | sys/netinet6/ip6_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 4cfcba24ac3..2be6e58a85d 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.148 2015/10/19 12:11:28 mpi Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.149 2015/10/23 00:15:07 jsg Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -634,7 +634,7 @@ ip6_input(struct mbuf *m) ip6 = mtod(m, struct ip6_hdr *); icmp6_error(m, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADDR, - (caddr_t)&ip6->ip6_dst - (caddr_t)ip6); + offsetof(struct ip6_hdr, ip6_dst)); break; } else goto bad; |