summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Hill <dhill@cvs.openbsd.org>2011-07-04 20:40:59 +0000
committerDavid Hill <dhill@cvs.openbsd.org>2011-07-04 20:40:59 +0000
commit9f45a0a1a078f5cb48dea38b4be6809ee26986bd (patch)
treea0a7b3e1af6f705e6960b82c689ae04734edd951 /sys
parentdcbf20f66fb414a09cad90c98f477ca3881f1bb8 (diff)
use mtod.
no change in binary "Sure" claudio@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_gre.c4
-rw-r--r--sys/net/if_pfsync.c4
-rw-r--r--sys/net/if_ppp.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index e2d880541f9..4e6d19a9547 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.54 2011/04/29 15:14:10 claudio Exp $ */
+/* $OpenBSD: if_gre.c,v 1.55 2011/07/04 20:40:58 dhill Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -725,7 +725,7 @@ gre_send_keepalive(void *arg)
MH_ALIGN(m, m->m_len);
/* build the ip header */
- ip = (struct ip *)m->m_data;
+ ip = mtod(m, struct ip *);
ip->ip_v = IPVERSION;
ip->ip_hl = sizeof(*ip) >> 2;
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index 98eedd649b6..2adc8f47206 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.163 2011/05/10 01:10:08 dlg Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.164 2011/07/04 20:40:58 dhill Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -1551,7 +1551,7 @@ pfsync_sendout(void)
m->m_len = m->m_pkthdr.len = sc->sc_len;
/* build the ip header */
- ip = (struct ip *)m->m_data;
+ ip = mtod(m, struct ip *);
bcopy(&sc->sc_template, ip, sizeof(*ip));
offset = sizeof(*ip);
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index 38aec598592..d45ea897148 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ppp.c,v 1.58 2010/05/02 22:34:31 stsp Exp $ */
+/* $OpenBSD: if_ppp.c,v 1.59 2011/07/04 20:40:58 dhill Exp $ */
/* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */
/*
@@ -1584,7 +1584,7 @@ pppdumpm(m0)
for (m = m0; m; m = m->m_next) {
int l = m->m_len;
- u_char *rptr = (u_char *)m->m_data;
+ u_char *rptr = mtod(m, u_char *);
while (l--) {
if (bp > buf + sizeof(buf) - 4)