diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2003-08-14 19:00:14 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2003-08-14 19:00:14 +0000 |
commit | 0b6b054dde657918dadbf3772248943ce0b55147 (patch) | |
tree | f5af25b2e0ec57e752af356f3effb204879b1a59 /sys/netinet | |
parent | a14f69d270af41914f7c3d15a9858cb54baeefe0 (diff) |
m_copyback()'s 4th arg is const void *, nuke (caddr_t) casts.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_ah.c | 12 | ||||
-rw-r--r-- | sys/netinet/ip_esp.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_ether.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_ipcomp.c | 6 | ||||
-rw-r--r-- | sys/netinet/ip_output.c | 6 |
5 files changed, 16 insertions, 16 deletions
diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c index 41bf387c718..ef632660fcb 100644 --- a/sys/netinet/ip_ah.c +++ b/sys/netinet/ip_ah.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ah.c,v 1.78 2003/07/24 09:59:02 itojun Exp $ */ +/* $OpenBSD: ip_ah.c,v 1.79 2003/08/14 19:00:12 jason Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -362,7 +362,7 @@ ah_massage_headers(struct mbuf **m0, int proto, int skip, int alg, int out) ip6.ip6_dst.s6_addr16[1] = 0; /* Done with IPv6 header. */ - m_copyback(m, 0, sizeof(struct ip6_hdr), (caddr_t) &ip6); + m_copyback(m, 0, sizeof(struct ip6_hdr), &ip6); /* Let's deal with the remaining headers (if any). */ if (skip - sizeof(struct ip6_hdr) > 0) { @@ -1153,7 +1153,7 @@ ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, (caddr_t) &iplen, sizeof(u_int16_t)); iplen = htons(ntohs(iplen) + rplen + ahx->authsize); m_copyback(m, offsetof(struct ip, ip_len), - sizeof(u_int16_t), (caddr_t) &iplen); + sizeof(u_int16_t), &iplen); break; #endif /* INET */ @@ -1164,7 +1164,7 @@ ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, (caddr_t) &iplen, sizeof(u_int16_t)); iplen = htons(ntohs(iplen) + rplen + ahx->authsize); m_copyback(m, offsetof(struct ip6_hdr, ip6_plen), - sizeof(u_int16_t), (caddr_t) &iplen); + sizeof(u_int16_t), &iplen); break; #endif /* INET6 */ } @@ -1174,7 +1174,7 @@ ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, /* Update the Next Protocol field in the IP header. */ prot = IPPROTO_AH; - m_copyback(m, protoff, sizeof(u_int8_t), (caddr_t) &prot); + m_copyback(m, protoff, sizeof(u_int8_t), &prot); /* "Massage" the packet headers for crypto processing. */ if ((len = ah_massage_headers(&m, tdb->tdb_dst.sa.sa_family, @@ -1187,7 +1187,7 @@ ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, } else { /* Update the Next Protocol field in the IP header. */ prot = IPPROTO_AH; - m_copyback(m, protoff, sizeof(u_int8_t), (caddr_t) &prot); + m_copyback(m, protoff, sizeof(u_int8_t), &prot); } /* Crypto operation descriptor. */ diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c index 8ea427e157b..a8794edaece 100644 --- a/sys/netinet/ip_esp.c +++ b/sys/netinet/ip_esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp.c,v 1.86 2003/07/24 09:59:02 itojun Exp $ */ +/* $OpenBSD: ip_esp.c,v 1.87 2003/08/14 19:00:12 jason Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -888,7 +888,7 @@ esp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, /* Fix Next Protocol in IPv4/IPv6 header. */ prot = IPPROTO_ESP; - m_copyback(m, protoff, sizeof(u_int8_t), (u_char *) &prot); + m_copyback(m, protoff, sizeof(u_int8_t), &prot); /* Get crypto descriptors. */ crp = crypto_getreq(esph && espx ? 2 : 1); diff --git a/sys/netinet/ip_ether.c b/sys/netinet/ip_ether.c index 00371a5bc63..419bf3f4942 100644 --- a/sys/netinet/ip_ether.c +++ b/sys/netinet/ip_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ether.c,v 1.44 2003/05/03 01:43:07 itojun Exp $ */ +/* $OpenBSD: ip_ether.c,v 1.45 2003/08/14 19:00:12 jason Exp $ */ /* * The author of this code is Angelos D. Keromytis (kermit@adk.gr) * @@ -412,7 +412,7 @@ etherip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, eip.eip_ver = ETHERIP_VERSION & ETHERIP_VER_VERS_MASK; eip.eip_pad = 0; m_copyback(m, hlen - sizeof(struct etherip_header), - sizeof(struct etherip_header), (caddr_t)&eip); + sizeof(struct etherip_header), &eip); *mp = m; diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c index 9530b0efc0a..41016b059ae 100644 --- a/sys/netinet/ip_ipcomp.c +++ b/sys/netinet/ip_ipcomp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipcomp.c,v 1.14 2003/04/02 20:09:26 millert Exp $ */ +/* $OpenBSD: ip_ipcomp.c,v 1.15 2003/08/14 19:00:12 jason Exp $ */ /* * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) @@ -352,7 +352,7 @@ ipcomp_input_cb(op) crypto_freereq(crp); /* Restore the Next Protocol field */ - m_copyback(m, protoff, sizeof(u_int8_t), (u_int8_t *) & nproto); + m_copyback(m, protoff, sizeof(u_int8_t), &nproto); /* Back to generic IPsec input processing */ error = ipsec_common_input_cb(m, tdb, skip, protoff, NULL); @@ -559,7 +559,7 @@ ipcomp_output(m, tdb, mp, skip, protoff) /* Fix Next Protocol in IPv4/IPv6 header */ prot = IPPROTO_IPCOMP; - m_copyback(m, protoff, sizeof(u_int8_t), (u_char *) & prot); + m_copyback(m, protoff, sizeof(u_int8_t), &prot); /* Ok now, we can pass to the crypto processing */ diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 0f8578b0e10..5a8bd4bd53d 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.154 2003/07/09 22:03:16 itojun Exp $ */ +/* $OpenBSD: ip_output.c,v 1.155 2003/08/14 19:00:12 jason Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -1434,7 +1434,7 @@ ip_ctloutput(op, so, level, optname, mp) m->m_len += ipr->ref_len; *mtod(m, u_int16_t *) = ipr->ref_type; m_copyback(m, sizeof(u_int16_t), ipr->ref_len, - (caddr_t)(ipr + 1)); + ipr + 1); } #endif break; @@ -1913,7 +1913,7 @@ in_delayed_cksum(struct mbuf *m) } if ((offset + sizeof(u_int16_t)) > m->m_len) - m_copyback(m, offset, sizeof(csum), (caddr_t) &csum); + m_copyback(m, offset, sizeof(csum), &csum); else *(u_int16_t *)(mtod(m, caddr_t) + offset) = csum; } |