summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-05-09 13:35:48 +0000
committerdg <dg@FreeBSD.org>1995-05-09 13:35:48 +0000
commit522567dac1ff47b12e0a137b8bd2741e122998eb (patch)
tree9d48adb1c0af75ef1704f761cced7c2545e237a0 /sys/net
parent472d2ef3ede7d23f82e47aa673c48a33d622931f (diff)
downloadFreeBSD-src-522567dac1ff47b12e0a137b8bd2741e122998eb.zip
FreeBSD-src-522567dac1ff47b12e0a137b8bd2741e122998eb.tar.gz
Replaced some bcopy()'s with memcpy()'s so that gcc while inline/optimize.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c4
-rw-r--r--sys/net/if_ethersubr.c10
-rw-r--r--sys/net/if_fddisubr.c10
3 files changed, 12 insertions, 12 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index b10782d..4eb4412 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -37,7 +37,7 @@
*
* @(#)bpf.c 8.2 (Berkeley) 3/28/94
*
- * $Id: bpf.c,v 1.4 1994/10/09 07:35:03 davidg Exp $
+ * $Id: bpf.c,v 1.5 1995/03/14 09:14:10 davidg Exp $
*/
#include "bpfilter.h"
@@ -1039,7 +1039,7 @@ bpf_mcopy(src_arg, dst_arg, len)
if (m == 0)
panic("bpf_mcopy");
count = min(m->m_len, len);
- bcopy(mtod(m, caddr_t), (caddr_t)dst, count);
+ (void)memcpy((caddr_t)dst, mtod(m, caddr_t), count);
m = m->m_next;
dst += count;
len -= count;
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 1fce9d4..07d7867 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
- * $Id: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp $
+ * $Id: if_ethersubr.c,v 1.6 1995/03/16 18:14:25 bde Exp $
*/
#include <sys/param.h>
@@ -245,7 +245,7 @@ ether_output(ifp, m0, dst, rt0)
case AF_UNSPEC:
eh = (struct ether_header *)dst->sa_data;
- bcopy((caddr_t)eh->ether_dhost, (caddr_t)edst, sizeof (edst));
+ (void)memcpy(edst, eh->ether_dhost, sizeof (edst));
type = eh->ether_type;
break;
@@ -267,10 +267,10 @@ ether_output(ifp, m0, dst, rt0)
senderr(ENOBUFS);
eh = mtod(m, struct ether_header *);
type = htons((u_short)type);
- bcopy((caddr_t)&type,(caddr_t)&eh->ether_type,
+ (void)memcpy(&eh->ether_type, &type,
sizeof(eh->ether_type));
- bcopy((caddr_t)edst, (caddr_t)eh->ether_dhost, sizeof (edst));
- bcopy((caddr_t)ac->ac_enaddr, (caddr_t)eh->ether_shost,
+ (void)memcpy(eh->ether_dhost, edst, sizeof (edst));
+ (void)memcpy(eh->ether_shost, ac->ac_enaddr,
sizeof(eh->ether_shost));
s = splimp();
/*
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 430dc6e..1ffdb2b 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp
- * $Id: if_fddisubr.c,v 1.2 1995/03/14 22:15:36 davidg Exp $
+ * $Id: if_fddisubr.c,v 1.3 1995/03/16 18:14:26 bde Exp $
*/
#include <sys/param.h>
@@ -264,7 +264,7 @@ fddi_output(ifp, m0, dst, rt0)
{
struct ether_header *eh;
eh = (struct ether_header *)dst->sa_data;
- bcopy((caddr_t)eh->ether_dhost, (caddr_t)edst, sizeof (edst));
+ (void)memcpy((caddr_t)edst, (caddr_t)eh->ether_dhost, sizeof (edst));
if (*edst & 1)
m->m_flags |= (M_BCAST|M_MCAST);
type = eh->ether_type;
@@ -325,7 +325,7 @@ fddi_output(ifp, m0, dst, rt0)
l->llc_dsap = l->llc_ssap = LLC_SNAP_LSAP;
l->llc_snap.org_code[0] = l->llc_snap.org_code[1] = l->llc_snap.org_code[2] = 0;
type = ntohs(type);
- bcopy((caddr_t) &type, (caddr_t) &l->llc_snap.ether_type,
+ (void)memcpy((caddr_t) &l->llc_snap.ether_type, (caddr_t) &type,
sizeof(u_short));
}
/*
@@ -337,9 +337,9 @@ fddi_output(ifp, m0, dst, rt0)
senderr(ENOBUFS);
fh = mtod(m, struct fddi_header *);
fh->fddi_fc = FDDIFC_LLC_ASYNC|FDDIFC_LLC_PRIO4;
- bcopy((caddr_t)edst, (caddr_t)fh->fddi_dhost, sizeof (edst));
+ (void)memcpy((caddr_t)fh->fddi_dhost, (caddr_t)edst, sizeof (edst));
queue_it:
- bcopy((caddr_t)ac->ac_enaddr, (caddr_t)fh->fddi_shost,
+ (void)memcpy((caddr_t)fh->fddi_shost, (caddr_t)ac->ac_enaddr,
sizeof(fh->fddi_shost));
s = splimp();
/*
OpenPOWER on IntegriCloud