Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci bcmp -> memcmp



details:   https://anonhg.NetBSD.org/src/rev/bb2117119bf3
branches:  trunk
changeset: 512204:bb2117119bf3
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Jul 07 16:47:43 2001 +0000

description:
bcmp -> memcmp

diffstat:

 sys/dev/pci/hifn7751.c |  10 +++++-----
 sys/dev/pci/if_de.c    |  18 +++++++++---------
 sys/dev/pci/if_sip.c   |   4 ++--
 3 files changed, 16 insertions(+), 16 deletions(-)

diffs (136 lines):

diff -r 313fa91eeab2 -r bb2117119bf3 sys/dev/pci/hifn7751.c
--- a/sys/dev/pci/hifn7751.c    Sat Jul 07 16:46:34 2001 +0000
+++ b/sys/dev/pci/hifn7751.c    Sat Jul 07 16:47:43 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hifn7751.c,v 1.4 2001/07/07 16:46:34 thorpej Exp $     */
+/*     $NetBSD: hifn7751.c,v 1.5 2001/07/07 16:47:43 thorpej Exp $     */
 /*     $OpenBSD: hifn7751.c,v 1.47 2000/10/11 13:15:41 itojun Exp $    */
 
 /*
@@ -610,7 +610,7 @@
                return;
        if (hifn_readramaddr(sc, 0, data, 1) < 0)
                return;
-       if (bcmp(data, dataexpect, sizeof(data)) != 0) {
+       if (memcmp(data, dataexpect, sizeof(data)) != 0) {
                sc->sc_drammodel = 1;
                return;
        }
@@ -625,7 +625,7 @@
                return;
        if (hifn_readramaddr(sc, 0, data, 1) < 0)
                return;
-       if (bcmp(data, dataexpect, sizeof(data)) != 0)
+       if (memcmp(data, dataexpect, sizeof(data)) != 0)
                sc->sc_drammodel = 1;
 }
 
@@ -652,7 +652,7 @@
                        return (0);
                if (hifn_readramaddr(sc, a, data, 1) < 0)
                        return (0);
-               if (bcmp(data, dataexpect, sizeof(data)) != 0)
+               if (memcmp(data, dataexpect, sizeof(data)) != 0)
                        return (0);
                hifn_reset_board(sc);
                hifn_init_dma(sc);
@@ -672,7 +672,7 @@
                hifn_init_pci_registers(sc);
                if (hifn_readramaddr(sc, a, data, 0) < 0)
                        return (0);
-               if (a != 0 && bcmp(data, dataexpect, sizeof(data)) == 0)
+               if (a != 0 && memcmp(data, dataexpect, sizeof(data)) == 0)
                        return (0);
                sc->sc_ramsize = a + 16384;
        }
diff -r 313fa91eeab2 -r bb2117119bf3 sys/dev/pci/if_de.c
--- a/sys/dev/pci/if_de.c       Sat Jul 07 16:46:34 2001 +0000
+++ b/sys/dev/pci/if_de.c       Sat Jul 07 16:47:43 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_de.c,v 1.101 2001/07/07 16:46:34 thorpej Exp $      */
+/*     $NetBSD: if_de.c,v 1.102 2001/07/07 16:47:43 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1994-1997 Matt Thomas (matt%3am-software.com@localhost)
@@ -2162,8 +2162,8 @@
 #define D0     4
     if (sc->tulip_chipid <= TULIP_DE425)
        return;
-    if (bcmp(sc->tulip_rombuf + 29, "DE500", 5) == 0
-       || bcmp(sc->tulip_rombuf + 29, "DE450", 5) == 0) {
+    if (memcmp(sc->tulip_rombuf + 29, "DE500", 5) == 0
+       || memcmp(sc->tulip_rombuf + 29, "DE450", 5) == 0) {
        memcpy(&sc->tulip_boardid[D0], sc->tulip_rombuf + 29, 8);
        sc->tulip_boardid[D0+8] = ' ';
     }
@@ -2946,7 +2946,7 @@
     }
 
 
-    if (bcmp(&sc->tulip_rombuf[0], &sc->tulip_rombuf[16], 8) != 0) {
+    if (memcmp(&sc->tulip_rombuf[0], &sc->tulip_rombuf[16], 8) != 0) {
        /*
         * Some folks don't use the standard ethernet rom format
         * but instead just put the address in the first 6 bytes
@@ -3031,14 +3031,14 @@
      * This is the standard DEC address ROM test.
      */
 
-    if (bcmp(&sc->tulip_rombuf[24], testpat, 8) != 0)
+    if (memcmp(&sc->tulip_rombuf[24], testpat, 8) != 0)
        return -3;
 
     tmpbuf[0] = sc->tulip_rombuf[15]; tmpbuf[1] = sc->tulip_rombuf[14];
     tmpbuf[2] = sc->tulip_rombuf[13]; tmpbuf[3] = sc->tulip_rombuf[12];
     tmpbuf[4] = sc->tulip_rombuf[11]; tmpbuf[5] = sc->tulip_rombuf[10];
     tmpbuf[6] = sc->tulip_rombuf[9];  tmpbuf[7] = sc->tulip_rombuf[8];
-    if (bcmp(&sc->tulip_rombuf[0], tmpbuf, 8) != 0)
+    if (memcmp(&sc->tulip_rombuf[0], tmpbuf, 8) != 0)
        return -2;
 
     memcpy(sc->tulip_enaddr, sc->tulip_rombuf, ETHER_ADDR_LEN);
@@ -3063,7 +3063,7 @@
      * Check for various boards based on OUI.  Did I say braindead?
      */
     for (idx = 0; tulip_vendors[idx].vendor_identify_nic != NULL; idx++) {
-       if (bcmp((caddr_t) sc->tulip_enaddr,
+       if (memcmp((caddr_t) sc->tulip_enaddr,
                 (caddr_t) tulip_vendors[idx].vendor_oui, 3) == 0) {
            (*tulip_vendors[idx].vendor_identify_nic)(sc);
            break;
@@ -3196,7 +3196,7 @@
        memset(sc->tulip_setupdata, 0, sizeof(sc->tulip_setupdata));
        ETHER_FIRST_MULTI(step, TULIP_ETHERCOM(sc), enm);
        while (enm != NULL) {
-               if (bcmp(enm->enm_addrlo, enm->enm_addrhi, 6) == 0) {
+               if (memcmp(enm->enm_addrlo, enm->enm_addrhi, 6) == 0) {
                    hash = tulip_mchash(enm->enm_addrlo);
 #if BYTE_ORDER == BIG_ENDIAN
                    sp[hash >> 4] |= bswap32(1 << (hash & 0xF));
@@ -3250,7 +3250,7 @@
             */
            ETHER_FIRST_MULTI(step, TULIP_ETHERCOM(sc), enm);
            for (; enm != NULL; idx++) {
-               if (bcmp(enm->enm_addrlo, enm->enm_addrhi, 6) == 0) {
+               if (memcmp(enm->enm_addrlo, enm->enm_addrhi, 6) == 0) {
 #if BYTE_ORDER == BIG_ENDIAN
                    *sp++ = ((u_int16_t *) enm->enm_addrlo)[0] << 16;
                    *sp++ = ((u_int16_t *) enm->enm_addrlo)[1] << 16;
diff -r 313fa91eeab2 -r bb2117119bf3 sys/dev/pci/if_sip.c
--- a/sys/dev/pci/if_sip.c      Sat Jul 07 16:46:34 2001 +0000
+++ b/sys/dev/pci/if_sip.c      Sat Jul 07 16:47:43 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_sip.c,v 1.36 2001/07/07 02:32:38 thorpej Exp $      */
+/*     $NetBSD: if_sip.c,v 1.37 2001/07/07 16:47:44 thorpej Exp $      */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -2434,7 +2434,7 @@
 
        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



Home | Main Index | Thread Index | Old Index