bcmp -> memcmp
This commit is contained in:
parent
b2237246e2
commit
c2c26e1362
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: an.c,v 1.17 2001/06/29 11:24:42 onoe Exp $ */
|
||||
/* $NetBSD: an.c,v 1.18 2001/07/07 05:35:39 thorpej Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
|
||||
|
@ -1814,7 +1814,7 @@ void an_cache_store (sc, eh, m, rx_quality)
|
|||
* . var w_nextitem holds total number of entries already cached
|
||||
*/
|
||||
for(i = 0; i < sc->an_nextitem; i++) {
|
||||
if (! bcmp(eh->ether_shost , sc->an_sigcache[i].macsrc, 6 )) {
|
||||
if (!memcmp(eh->ether_shost , sc->an_sigcache[i].macsrc, 6 )) {
|
||||
/* Match!,
|
||||
* so we already have this entry,
|
||||
* update the data
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dp8390.c,v 1.44 2001/02/12 18:56:26 thorpej Exp $ */
|
||||
/* $NetBSD: dp8390.c,v 1.45 2001/07/07 05:35:39 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
|
||||
|
@ -1050,7 +1050,7 @@ dp8390_getmcaf(ec, af)
|
|||
af[i] = 0;
|
||||
ETHER_FIRST_MULTI(step, ec, enm);
|
||||
while (enm != NULL) {
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi,
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi,
|
||||
sizeof(enm->enm_addrlo)) != 0) {
|
||||
/*
|
||||
* We must listen to a range of multicast addresses.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: elinkxl.c,v 1.51 2001/06/12 22:32:50 thorpej Exp $ */
|
||||
/* $NetBSD: elinkxl.c,v 1.52 2001/07/07 05:35:39 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -734,7 +734,7 @@ ex_set_mc(sc)
|
|||
} else {
|
||||
ETHER_FIRST_MULTI(estep, ec, enm);
|
||||
while (enm != NULL) {
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi,
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi,
|
||||
ETHER_ADDR_LEN) != 0)
|
||||
goto out;
|
||||
i = ex_mchash(enm->enm_addrlo);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: i82586.c,v 1.37 2001/04/09 22:31:16 bjh21 Exp $ */
|
||||
/* $NetBSD: i82586.c,v 1.38 2001/07/07 05:35:39 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -147,7 +147,7 @@ Mode of operation:
|
|||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.37 2001/04/09 22:31:16 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.38 2001/07/07 05:35:39 thorpej Exp $");
|
||||
|
||||
#include <sys/systm.h>
|
||||
#include <sys/mbuf.h>
|
||||
|
@ -1832,7 +1832,7 @@ again:
|
|||
while (enm) {
|
||||
size += 6;
|
||||
if (sc->mcast_count >= IE_MAXMCAST ||
|
||||
bcmp(enm->enm_addrlo, enm->enm_addrhi, 6) != 0) {
|
||||
memcmp(enm->enm_addrlo, enm->enm_addrhi, 6) != 0) {
|
||||
sc->sc_ethercom.ec_if.if_flags |= IFF_ALLMULTI;
|
||||
i82586_ioctl(&sc->sc_ethercom.ec_if,
|
||||
SIOCSIFFLAGS, (void *)0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lance.c,v 1.22 2001/06/19 07:19:35 jdolecek Exp $ */
|
||||
/* $NetBSD: lance.c,v 1.23 2001/07/07 05:35:40 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -141,7 +141,7 @@ void lance_watchdog __P((struct ifnet *));
|
|||
|
||||
/*
|
||||
* Compare two Ether/802 addresses for equality, inlined and
|
||||
* unrolled for speed. Use this like bcmp().
|
||||
* unrolled for speed. Use this like memcmp().
|
||||
*
|
||||
* XXX: Add <machine/inlines.h> for stuff like this?
|
||||
* XXX: or maybe add it to libkern.h instead?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mb86960.c,v 1.46 2001/06/12 14:59:28 wiz Exp $ */
|
||||
/* $NetBSD: mb86960.c,v 1.47 2001/07/07 05:35:40 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
|
||||
|
@ -1570,7 +1570,7 @@ mb86960_getmcaf(ec, af)
|
|||
af[0] = af[1] = af[2] = af[3] = af[4] = af[5] = af[6] = af[7] = 0x00;
|
||||
ETHER_FIRST_MULTI(step, ec, enm);
|
||||
while (enm != NULL) {
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi,
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi,
|
||||
sizeof(enm->enm_addrlo)) != 0) {
|
||||
/*
|
||||
* We must listen to a range of multicast addresses.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: midway.c,v 1.50 2001/07/05 08:38:26 toshii Exp $ */
|
||||
/* $NetBSD: midway.c,v 1.51 2001/07/07 05:35:40 thorpej Exp $ */
|
||||
/* (sync'd to midway.c 1.68) */
|
||||
|
||||
/*
|
||||
|
@ -1113,10 +1113,10 @@ int wmtry;
|
|||
EN_WRITE(sc, MID_MAST_CSR, MID_MCSR_ENDMA); /* re-enable DMA (only) */
|
||||
|
||||
if (wmtry) {
|
||||
return(bcmp(sp, dp, wmtry)); /* wmtry always exits here, no looping */
|
||||
return(memcmp(sp, dp, wmtry)); /* wmtry always exits here, no looping */
|
||||
}
|
||||
|
||||
if (bcmp(sp, dp, lcv))
|
||||
if (memcmp(sp, dp, lcv))
|
||||
return(retval); /* failed, use last value */
|
||||
|
||||
retval = lcv;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ne2000.c,v 1.33 2001/06/05 02:31:16 thorpej Exp $ */
|
||||
/* $NetBSD: ne2000.c,v 1.34 2001/07/07 05:35:41 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -198,7 +198,7 @@ ne2000_attach(nsc, myea)
|
|||
x << ED_PAGE_SHIFT, ED_PAGE_SIZE, useword, 0);
|
||||
ne2000_readmem(nict, nich, asict, asich,
|
||||
x << ED_PAGE_SHIFT, tbuf, ED_PAGE_SIZE, useword);
|
||||
if (bcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
if (memcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
for (i = 0; i < ED_PAGE_SIZE; i++)
|
||||
pbuf[i] = 255 - x;
|
||||
ne2000_writemem(nict, nich, asict, asich,
|
||||
|
@ -207,7 +207,7 @@ ne2000_attach(nsc, myea)
|
|||
ne2000_readmem(nict, nich, asict, asich,
|
||||
x << ED_PAGE_SHIFT, tbuf, ED_PAGE_SIZE,
|
||||
useword);
|
||||
if (bcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
if (memcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
mstart = x << ED_PAGE_SHIFT;
|
||||
memsize = ED_PAGE_SIZE;
|
||||
break;
|
||||
|
@ -227,7 +227,7 @@ ne2000_attach(nsc, myea)
|
|||
x << ED_PAGE_SHIFT, ED_PAGE_SIZE, useword, 0);
|
||||
ne2000_readmem(nict, nich, asict, asich,
|
||||
x << ED_PAGE_SHIFT, tbuf, ED_PAGE_SIZE, useword);
|
||||
if (bcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
if (memcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
for (i = 0; i < ED_PAGE_SIZE; i++)
|
||||
pbuf[i] = 255 - x;
|
||||
ne2000_writemem(nict, nich, asict, asich,
|
||||
|
@ -236,7 +236,7 @@ ne2000_attach(nsc, myea)
|
|||
ne2000_readmem(nict, nich, asict, asich,
|
||||
x << ED_PAGE_SHIFT, tbuf, ED_PAGE_SIZE,
|
||||
useword);
|
||||
if (bcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0)
|
||||
if (memcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0)
|
||||
memsize += ED_PAGE_SIZE;
|
||||
else
|
||||
break;
|
||||
|
@ -430,7 +430,7 @@ ne2000_detect(nict, nich, asict, asich)
|
|||
ne2000_readmem(nict, nich, asict, asich, 8192, test_buffer,
|
||||
sizeof(test_buffer), 0);
|
||||
|
||||
if (bcmp(test_pattern, test_buffer, sizeof(test_pattern))) {
|
||||
if (memcmp(test_pattern, test_buffer, sizeof(test_pattern))) {
|
||||
/* not an NE1000 - try NE2000 */
|
||||
bus_space_write_1(nict, nich, ED_P0_DCR,
|
||||
ED_DCR_WTS | ED_DCR_FT1 | ED_DCR_LS);
|
||||
|
@ -448,7 +448,7 @@ ne2000_detect(nict, nich, asict, asich)
|
|||
ne2000_readmem(nict, nich, asict, asich, 16384, test_buffer,
|
||||
sizeof(test_buffer), 1);
|
||||
|
||||
if (bcmp(test_pattern, test_buffer, sizeof(test_pattern)))
|
||||
if (memcmp(test_pattern, test_buffer, sizeof(test_pattern)))
|
||||
goto out; /* not an NE2000 either */
|
||||
|
||||
rv = NE2000_TYPE_NE2000;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pdq_ifsubr.c,v 1.33 2001/06/25 06:44:41 enami Exp $ */
|
||||
/* $NetBSD: pdq_ifsubr.c,v 1.34 2001/07/07 05:35:41 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
|
||||
|
@ -327,7 +327,7 @@ pdq_os_addr_fill(
|
|||
|
||||
ETHER_FIRST_MULTI(step, PDQ_FDDICOM(sc), enm);
|
||||
while (enm != NULL && num_addrs > 0) {
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi, 6) == 0) {
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi, 6) == 0) {
|
||||
((u_short *) addr->lanaddr_bytes)[0] = ((u_short *) enm->enm_addrlo)[0];
|
||||
((u_short *) addr->lanaddr_bytes)[1] = ((u_short *) enm->enm_addrlo)[1];
|
||||
((u_short *) addr->lanaddr_bytes)[2] = ((u_short *) enm->enm_addrlo)[2];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: seeq8005.c,v 1.27 2001/06/26 22:00:44 bjh21 Exp $ */
|
||||
/* $NetBSD: seeq8005.c,v 1.28 2001/07/07 05:35:41 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000, 2001 Ben Harris
|
||||
|
@ -63,7 +63,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
__RCSID("$NetBSD: seeq8005.c,v 1.27 2001/06/26 22:00:44 bjh21 Exp $");
|
||||
__RCSID("$NetBSD: seeq8005.c,v 1.28 2001/07/07 05:35:41 thorpej Exp $");
|
||||
|
||||
#include <sys/systm.h>
|
||||
#include <sys/endian.h>
|
||||
|
@ -1384,7 +1384,7 @@ ea_mc_reset_8004(struct seeq8005_softc *sc)
|
|||
af[i] = 0;
|
||||
ETHER_FIRST_MULTI(step, ec, enm);
|
||||
while (enm != NULL) {
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi,
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi,
|
||||
sizeof(enm->enm_addrlo)) != 0) {
|
||||
/*
|
||||
* We must listen to a range of multicast addresses.
|
||||
|
@ -1431,7 +1431,7 @@ ea_mc_reset_8005(struct seeq8005_softc *sc)
|
|||
while (enm != NULL) {
|
||||
/* Have we got space? */
|
||||
if (naddr >= maxaddrs ||
|
||||
bcmp(enm->enm_addrlo, enm->enm_addrhi, 6) != 0) {
|
||||
memcmp(enm->enm_addrlo, enm->enm_addrhi, 6) != 0) {
|
||||
sc->sc_ethercom.ec_if.if_flags |= IFF_ALLMULTI;
|
||||
ea_ioctl(&sc->sc_ethercom.ec_if, SIOCSIFFLAGS, NULL);
|
||||
return;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sgec.c,v 1.13 2001/04/15 15:01:35 ragge Exp $ */
|
||||
/* $NetBSD: sgec.c,v 1.14 2001/07/07 05:35:41 thorpej Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
|
||||
*
|
||||
|
@ -627,7 +627,7 @@ ze_setup(sc)
|
|||
ifp->if_flags &= ~IFF_ALLMULTI;
|
||||
ETHER_FIRST_MULTI(step, &sc->sc_ec, enm);
|
||||
while (enm != NULL) {
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi, 6)) {
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi, 6)) {
|
||||
ifp->if_flags |= IFF_ALLMULTI;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: smc83c170.c,v 1.45 2001/06/12 22:32:50 thorpej Exp $ */
|
||||
/* $NetBSD: smc83c170.c,v 1.46 2001/07/07 05:35:42 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -1272,7 +1272,7 @@ epic_set_mchash(sc)
|
|||
|
||||
ETHER_FIRST_MULTI(step, ec, enm);
|
||||
while (enm != NULL) {
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
|
||||
/*
|
||||
* We must listen to a range of multicast addresses.
|
||||
* For now, just accept all multicasts, rather than
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tulip.c,v 1.93 2001/06/12 22:32:50 thorpej Exp $ */
|
||||
/* $NetBSD: tulip.c,v 1.94 2001/07/07 05:35:42 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -2562,7 +2562,7 @@ tlp_filter_setup(sc)
|
|||
cnt = 0;
|
||||
ETHER_FIRST_MULTI(step, ec, enm);
|
||||
while (enm != NULL) {
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
|
||||
/*
|
||||
* We must listen to a range of multicast addresses.
|
||||
* For now, just accept all multicasts, rather than
|
||||
|
@ -2623,7 +2623,7 @@ tlp_filter_setup(sc)
|
|||
memset(TULIP_CDSP(sc), 0, TULIP_SETUP_PACKET_LEN);
|
||||
ETHER_FIRST_MULTI(step, ec, enm);
|
||||
while (enm != NULL) {
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
|
||||
/*
|
||||
* We must listen to a range of multicast addresses.
|
||||
* For now, just accept all multicasts, rather than
|
||||
|
@ -2775,7 +2775,7 @@ tlp_winb_filter_setup(sc)
|
|||
|
||||
ETHER_FIRST_MULTI(step, ec, enm);
|
||||
while (enm != NULL) {
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
|
||||
/*
|
||||
* We must listen to a range of multicast addresses.
|
||||
* For now, just accept all multicasts, rather than
|
||||
|
@ -2852,7 +2852,7 @@ tlp_al981_filter_setup(sc)
|
|||
|
||||
ETHER_FIRST_MULTI(step, ec, enm);
|
||||
while (enm != NULL) {
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
|
||||
/*
|
||||
* We must listen to a range of multicast addresses.
|
||||
* For now, just accept all multicasts, rather than
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wi.c,v 1.18 2001/06/27 22:22:12 nathanw Exp $ */
|
||||
/* $NetBSD: wi.c,v 1.19 2001/07/07 05:35:42 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
|
@ -178,7 +178,7 @@ wi_attach(sc)
|
|||
* Is it really enough just checking against null ethernet address?
|
||||
* Or, check against possible vendor? XXX.
|
||||
*/
|
||||
if (bcmp(sc->sc_macaddr, empty_macaddr, ETHER_ADDR_LEN) == 0) {
|
||||
if (memcmp(sc->sc_macaddr, empty_macaddr, ETHER_ADDR_LEN) == 0) {
|
||||
printf("%s: could not get mac address, attach failed\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
return 1;
|
||||
|
@ -943,7 +943,7 @@ allmulti:
|
|||
ETHER_FIRST_MULTI(estep, ec, enm);
|
||||
while (enm != NULL) {
|
||||
/* Punt on ranges or too many multicast addresses. */
|
||||
if (bcmp(enm->enm_addrlo, enm->enm_addrhi,
|
||||
if (memcmp(enm->enm_addrlo, enm->enm_addrhi,
|
||||
ETHER_ADDR_LEN) != 0 ||
|
||||
i >= 16)
|
||||
goto allmulti;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: z8530sc.c,v 1.13 2001/06/25 08:30:11 wdk Exp $ */
|
||||
/* $NetBSD: z8530sc.c,v 1.14 2001/07/07 05:36:18 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Gordon W. Ross
|
||||
|
@ -141,7 +141,7 @@ zs_loadchannelregs(cs)
|
|||
zs_iflush(cs); /* XXX */
|
||||
#endif
|
||||
|
||||
if (bcmp((caddr_t)cs->cs_preg, (caddr_t)cs->cs_creg, 16) == 0)
|
||||
if (memcmp((caddr_t)cs->cs_preg, (caddr_t)cs->cs_creg, 16) == 0)
|
||||
return; /* only change if values are different */
|
||||
|
||||
/* Copy "pending" regs to "current" */
|
||||
|
|
Loading…
Reference in New Issue