diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-12-11 19:21:58 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-12-11 19:21:58 +0000 |
commit | a910e52291d2cfda61f90e627a5bad213f867725 (patch) | |
tree | 931f97a1573be7eab5816a0ebfb81db79383e17c /sys/kern/uipc_mbuf.c | |
parent | ce5ed9abd090b575ddb198f85a99c6df14c7e6ed (diff) |
convert bcopy to memcpy/memmove. ok krw
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 3c03cdc5167..1552168123e 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.198 2014/11/05 00:28:15 dlg Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.199 2014/12/11 19:21:57 tedu Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -606,7 +606,7 @@ m_copydata(struct mbuf *m, int off, int len, caddr_t cp) if (m == NULL) panic("m_copydata: null mbuf"); count = min(m->m_len - off, len); - bcopy(mtod(m, caddr_t) + off, cp, count); + memmove(cp, mtod(m, caddr_t) + off, count); len -= count; cp += count; off = 0; @@ -659,7 +659,7 @@ m_copyback(struct mbuf *m0, int off, int len, const void *_cp, int wait) m->m_len += min(len - (m->m_len - off), M_TRAILINGSPACE(m)); mlen = min(m->m_len - off, len); - bcopy(cp, mtod(m, caddr_t) + off, (size_t)mlen); + memmove(mtod(m, caddr_t) + off, cp, mlen); cp += mlen; len -= mlen; totlen += mlen + off; @@ -712,8 +712,8 @@ m_cat(struct mbuf *m, struct mbuf *n) return; } /* splat the data from one into the other */ - bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len, - (u_int)n->m_len); + memcpy(mtod(m, caddr_t) + m->m_len, mtod(n, caddr_t), + n->m_len); m->m_len += n->m_len; n = m_free(n); } @@ -841,8 +841,8 @@ m_pullup(struct mbuf *n, int len) do { count = min(len, n->m_len); - bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len, - (unsigned)count); + memcpy(mtod(m, caddr_t) + m->m_len, mtod(n, caddr_t), + count); len -= count; m->m_len += count; n->m_len -= count; @@ -1012,7 +1012,7 @@ extpacket: MCLADDREFERENCE(m, n); n->m_data = m->m_data + len; } else { - bcopy(mtod(m, caddr_t) + len, mtod(n, caddr_t), remain); + memcpy(mtod(n, caddr_t), mtod(m, caddr_t) + len, remain); } n->m_len = remain; m->m_len = len; |