Change memcmp() to bcmp(). memcmp() isn't declared or implemented
for the kernel, but gcc provides an inline version of it if the kernel is compiled with -O.
This commit is contained in:
parent
73145c38cc
commit
1c85ed9abd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9717
@ -13,7 +13,7 @@
|
||||
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
|
||||
* and a variety of similar clones.
|
||||
*
|
||||
* $Id: if_ed.c,v 1.72 1995/05/14 11:01:20 davidg Exp $
|
||||
* $Id: if_ed.c,v 1.73 1995/05/30 08:01:58 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#include "ed.h"
|
||||
@ -1074,12 +1074,12 @@ ed_probe_Novell(isa_dev)
|
||||
/* Search for the start of RAM. */
|
||||
for (x = 1; x < 256; x++) {
|
||||
ed_pio_readmem(sc, x * 256, tbuf, ED_PAGE_SIZE);
|
||||
if (memcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
if (bcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
for (i = 0; i < ED_PAGE_SIZE; i++)
|
||||
pbuf[i] = 255 - x;
|
||||
ed_pio_writemem(sc, pbuf, x * 256, ED_PAGE_SIZE);
|
||||
ed_pio_readmem(sc, x * 256, tbuf, ED_PAGE_SIZE);
|
||||
if (memcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
if (bcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
mstart = x * ED_PAGE_SIZE;
|
||||
msize = ED_PAGE_SIZE;
|
||||
break;
|
||||
@ -1094,12 +1094,12 @@ ed_probe_Novell(isa_dev)
|
||||
/* Search for the start of RAM. */
|
||||
for (x = (mstart / ED_PAGE_SIZE) + 1; x < 256; x++) {
|
||||
ed_pio_readmem(sc, x * 256, tbuf, ED_PAGE_SIZE);
|
||||
if (memcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
if (bcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
for (i = 0; i < ED_PAGE_SIZE; i++)
|
||||
pbuf[i] = 255 - x;
|
||||
ed_pio_writemem(sc, pbuf, x * 256, ED_PAGE_SIZE);
|
||||
ed_pio_readmem(sc, x * 256, tbuf, ED_PAGE_SIZE);
|
||||
if (memcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0)
|
||||
if (bcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0)
|
||||
msize += ED_PAGE_SIZE;
|
||||
else {
|
||||
break;
|
||||
|
@ -13,7 +13,7 @@
|
||||
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
|
||||
* and a variety of similar clones.
|
||||
*
|
||||
* $Id: if_ed.c,v 1.72 1995/05/14 11:01:20 davidg Exp $
|
||||
* $Id: if_ed.c,v 1.73 1995/05/30 08:01:58 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#include "ed.h"
|
||||
@ -1074,12 +1074,12 @@ ed_probe_Novell(isa_dev)
|
||||
/* Search for the start of RAM. */
|
||||
for (x = 1; x < 256; x++) {
|
||||
ed_pio_readmem(sc, x * 256, tbuf, ED_PAGE_SIZE);
|
||||
if (memcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
if (bcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
for (i = 0; i < ED_PAGE_SIZE; i++)
|
||||
pbuf[i] = 255 - x;
|
||||
ed_pio_writemem(sc, pbuf, x * 256, ED_PAGE_SIZE);
|
||||
ed_pio_readmem(sc, x * 256, tbuf, ED_PAGE_SIZE);
|
||||
if (memcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
if (bcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
mstart = x * ED_PAGE_SIZE;
|
||||
msize = ED_PAGE_SIZE;
|
||||
break;
|
||||
@ -1094,12 +1094,12 @@ ed_probe_Novell(isa_dev)
|
||||
/* Search for the start of RAM. */
|
||||
for (x = (mstart / ED_PAGE_SIZE) + 1; x < 256; x++) {
|
||||
ed_pio_readmem(sc, x * 256, tbuf, ED_PAGE_SIZE);
|
||||
if (memcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
if (bcmp(pbuf0, tbuf, ED_PAGE_SIZE) == 0) {
|
||||
for (i = 0; i < ED_PAGE_SIZE; i++)
|
||||
pbuf[i] = 255 - x;
|
||||
ed_pio_writemem(sc, pbuf, x * 256, ED_PAGE_SIZE);
|
||||
ed_pio_readmem(sc, x * 256, tbuf, ED_PAGE_SIZE);
|
||||
if (memcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0)
|
||||
if (bcmp(pbuf, tbuf, ED_PAGE_SIZE) == 0)
|
||||
msize += ED_PAGE_SIZE;
|
||||
else {
|
||||
break;
|
||||
|
@ -47,7 +47,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: if_ze.c,v 1.16 1995/05/24 20:33:42 davidg Exp $
|
||||
* $Id: if_ze.c,v 1.17 1995/05/30 08:02:27 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#include "ze.h"
|
||||
@ -209,11 +209,11 @@ ze_check_cis (unsigned char *scratch)
|
||||
card_info[k++] = scratch[j] == '\0' ? '~' : scratch[j];
|
||||
card_info[k++] = '\0';
|
||||
#if 0
|
||||
return (memcmp (card_info, CARD_INFO, sizeof(CARD_INFO)-1) == 0);
|
||||
return (bcmp (card_info, CARD_INFO, sizeof(CARD_INFO)-1) == 0);
|
||||
#else
|
||||
if ((memcmp (card_info, CARD_INFO, sizeof(CARD_INFO)-1) == 0) ||
|
||||
(memcmp (card_info, CARD2_INFO, sizeof(CARD2_INFO)-1) == 0) ||
|
||||
(memcmp (card_info, CARD3_INFO, sizeof(CARD3_INFO)-1) == 0)) {
|
||||
if ((bcmp (card_info, CARD_INFO, sizeof(CARD_INFO)-1) == 0) ||
|
||||
(bcmp (card_info, CARD2_INFO, sizeof(CARD2_INFO)-1) == 0) ||
|
||||
(bcmp (card_info, CARD3_INFO, sizeof(CARD3_INFO)-1) == 0)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* From: if_ep.c,v 1.9 1994/01/25 10:46:29 deraadt Exp $
|
||||
* $Id: if_zp.c,v 1.5 1995/04/20 07:22:04 phk Exp $
|
||||
* $Id: if_zp.c,v 1.6 1995/05/30 08:02:31 rgrimes Exp $
|
||||
*/
|
||||
/*-
|
||||
* TODO:
|
||||
@ -330,9 +330,9 @@ zp_check_cis(unsigned char *scratch)
|
||||
card_info[k++] = '\0';
|
||||
#ifdef ZP_DEBUG
|
||||
printf("card info = %s\n", card_info);
|
||||
printf("result = %d\n", memcmp(card_info, CARD_INFO, sizeof(CARD_INFO) - 1) == 0);
|
||||
printf("result = %d\n", bcmp(card_info, CARD_INFO, sizeof(CARD_INFO) - 1) == 0);
|
||||
#endif
|
||||
return (memcmp(card_info, CARD_INFO, sizeof(CARD_INFO) - 1) == 0);
|
||||
return (bcmp(card_info, CARD_INFO, sizeof(CARD_INFO) - 1) == 0);
|
||||
}
|
||||
i += 4 + 2 * link;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user