diff options
author | des <des@FreeBSD.org> | 2003-04-04 12:14:00 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-04-04 12:14:00 +0000 |
commit | ada79efc07f57a0c0a876be531268fb042460b5c (patch) | |
tree | 57df77dd619f2146fe69a4ba831a45c1fbc2b406 | |
parent | c011a79e99b36b0a6465a295cb0a3d3f928c9d90 (diff) | |
download | FreeBSD-src-ada79efc07f57a0c0a876be531268fb042460b5c.zip FreeBSD-src-ada79efc07f57a0c0a876be531268fb042460b5c.tar.gz |
Replace memcpy() and ovbcopy() with bcopy(); ditch some caddr_t usage.
-rw-r--r-- | sys/netinet/ip_output.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index c00ac4c..478a0d5 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1317,12 +1317,12 @@ ip_insertoptions(m, opt, phlen) m = n; m->m_len = optlen + sizeof(struct ip); m->m_data += max_linkhdr; - (void)memcpy(mtod(m, void *), ip, sizeof(struct ip)); + bcopy(ip, mtod(m, void *), sizeof(struct ip)); } else { m->m_data -= optlen; m->m_len += optlen; m->m_pkthdr.len += optlen; - ovbcopy((caddr_t)ip, mtod(m, caddr_t), sizeof(struct ip)); + bcopy(ip, mtod(m, void *), sizeof(struct ip)); } ip = mtod(m, struct ip *); bcopy(p->ipopt_list, ip + 1, optlen); @@ -1678,8 +1678,8 @@ ip_pcbopts(optname, pcbopt, m) cnt = m->m_len; m->m_len += sizeof(struct in_addr); cp = mtod(m, u_char *) + sizeof(struct in_addr); - ovbcopy(mtod(m, caddr_t), (caddr_t)cp, (unsigned)cnt); - bzero(mtod(m, caddr_t), sizeof(struct in_addr)); + bcopy(mtod(m, void *), cp, (unsigned)cnt); + bzero(mtod(m, void *), sizeof(struct in_addr)); for (; cnt > 0; cnt -= optlen, cp += optlen) { opt = cp[IPOPT_OPTVAL]; @@ -1724,9 +1724,8 @@ ip_pcbopts(optname, pcbopt, m) * Then copy rest of options back * to close up the deleted entry. */ - ovbcopy((caddr_t)(&cp[IPOPT_OFFSET+1] + - sizeof(struct in_addr)), - (caddr_t)&cp[IPOPT_OFFSET+1], + bcopy((&cp[IPOPT_OFFSET+1] + sizeof(struct in_addr)), + &cp[IPOPT_OFFSET+1], (unsigned)cnt + sizeof(struct in_addr)); break; } |