artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
caf33b7
)
replace pointer arithmetic and casts with offsetof
author
jsg
<jsg@openbsd.org>
Fri, 23 Oct 2015 00:15:07 +0000
(
00:15
+0000)
committer
jsg
<jsg@openbsd.org>
Fri, 23 Oct 2015 00:15:07 +0000
(
00:15
+0000)
ok mpi@ bluhm@
sys/netinet6/ip6_input.c
patch
|
blob
|
history
diff --git
a/sys/netinet6/ip6_input.c
b/sys/netinet6/ip6_input.c
index
4cfcba2
..
2be6e58
100644
(file)
--- a/
sys/netinet6/ip6_input.c
+++ b/
sys/netinet6/ip6_input.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: ip6_input.c,v 1.14
8 2015/10/19 12:11:28 mpi
Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.14
9 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;