summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-06-08 08:19:03 +0000
committerbde <bde@FreeBSD.org>1996-06-08 08:19:03 +0000
commit11d257651da74ba5cbe2ef53e48cb48b442da014 (patch)
tree3b9bca5073ac6e148e368b3f541dea769969481d /sys/netinet/ip_output.c
parent2aabf9403776db6ad169efb7b6d1bc783e05f5d9 (diff)
downloadFreeBSD-src-11d257651da74ba5cbe2ef53e48cb48b442da014.zip
FreeBSD-src-11d257651da74ba5cbe2ef53e48cb48b442da014.tar.gz
Changed some memcpy()'s back to bcopy()'s.
gcc only inlines memcpy()'s whose count is constant and didn't inline these. I want memcpy() in the kernel go away so that it's obvious that it doesn't need to be optimized. Now it is only used for one struct copy in si.c.
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index cf12527..7777114 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_output.c 8.3 (Berkeley) 1/21/94
- * $Id: ip_output.c,v 1.38 1996/05/21 20:47:31 peter Exp $
+ * $Id: ip_output.c,v 1.39 1996/05/22 17:23:08 wollman Exp $
*/
#define _IP_VHL
@@ -513,7 +513,7 @@ ip_insertoptions(m, opt, phlen)
ovbcopy((caddr_t)ip, mtod(m, caddr_t), sizeof(struct ip));
}
ip = mtod(m, struct ip *);
- (void)memcpy(ip + 1, p->ipopt_list, (unsigned)optlen);
+ bcopy(p->ipopt_list, ip + 1, optlen);
*phlen = sizeof(struct ip) + optlen;
ip->ip_vhl = IP_MAKE_VHL(IPVERSION, *phlen >> 2);
ip->ip_len += optlen;
@@ -549,7 +549,7 @@ ip_optcopy(ip, jp)
if (optlen > cnt)
optlen = cnt;
if (IPOPT_COPIED(opt)) {
- (void)memcpy(dp, cp, (unsigned)optlen);
+ bcopy(cp, dp, optlen);
dp += optlen;
}
}
@@ -683,8 +683,8 @@ ip_ctloutput(op, so, level, optname, mp)
*mp = m = m_get(M_WAIT, MT_SOOPTS);
if (inp->inp_options) {
m->m_len = inp->inp_options->m_len;
- (void)memcpy(mtod(m, void *),
- mtod(inp->inp_options, void *), (unsigned)m->m_len);
+ bcopy(mtod(inp->inp_options, void *),
+ mtod(m, void *), m->m_len);
} else
m->m_len = 0;
break;
OpenPOWER on IntegriCloud