bcopy -> memcpy, bzero -> memset

This commit is contained in:
wiz 2001-07-22 15:46:41 +00:00
parent 9654501023
commit 8eaf0a103e
4 changed files with 17 additions and 18 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: gdrom.c,v 1.4 2001/04/24 19:43:25 marcus Exp $ */
/* $NetBSD: gdrom.c,v 1.5 2001/07/22 15:46:42 wiz Exp $ */
/*-
* Copyright (c) 2001 Marcus Comstedt
@ -275,7 +275,7 @@ int gdrom_command_sense(sc, req, buf, nbyt)
return (0);
}
bzero(cmd, sizeof(cmd));
memset(cmd, 0, sizeof(cmd));
cmd[0] = 0x13;
cmd[4] = sizeof(sense_data);
@ -312,7 +312,7 @@ int gdrom_read_toc(sc, toc)
10 - - */
unsigned char cmd[12];
bzero(cmd, sizeof(cmd));
memset(cmd, 0, sizeof(cmd));
cmd[0] = 0x14;
cmd[3] = sizeof(struct gd_toc)>>8;
@ -336,7 +336,7 @@ int gdrom_read_sectors(sc, buf, sector, cnt)
10 cnt(lo) - */
unsigned char cmd[12];
bzero(cmd, sizeof(cmd));
memset(cmd, 0, sizeof(cmd));
cmd[0] = 0x30;
cmd[1] = 0x20;
@ -362,7 +362,7 @@ int gdrom_mount_disk(sc)
10 - - */
unsigned char cmd[12];
bzero(cmd, sizeof(cmd));
memset(cmd, 0, sizeof(cmd));
cmd[0] = 0x70;
cmd[1] = 0x1f;

View File

@ -1,4 +1,4 @@
/* $NetBSD: maple.c,v 1.8 2001/05/26 21:27:06 chs Exp $ */
/* $NetBSD: maple.c,v 1.9 2001/07/22 15:46:41 wiz Exp $ */
/*-
* Copyright (c) 2001 Marcus Comstedt
@ -280,9 +280,8 @@ maple_scanbus(sc)
u_int32_t *to_swap;
int i;
bcopy(sc->sc_rxbuf[p][s]+1,
(to_swap = &sc->sc_unit[p][s].devinfo.di_func),
sizeof(struct maple_devinfo));
memcpy((to_swap = &sc->sc_unit[p][s].devinfo.di_func),
sc->sc_rxbuf[p][s]+1, sizeof(struct maple_devinfo));
for (i = 0; i < 4; i++, to_swap++)
*to_swap = ntohl(*to_swap);
@ -517,7 +516,7 @@ mapleattach(parent, self, aux)
maple_scanbus(sc);
bzero(&sc->maple_callout_ch, sizeof(sc->maple_callout_ch));
memset(&sc->maple_callout_ch, 0, sizeof(sc->maple_callout_ch));
callout_reset(&sc->maple_callout_ch, MAPLE_CALLOUT_TICKS,
(void *)maple_callout, sc);
@ -645,7 +644,7 @@ maple_internal_ioctl(sc, port, subunit, cmd, data, flag, p)
switch(cmd) {
case MAPLEIO_GDEVINFO:
bcopy(&u->devinfo, data, sizeof(struct maple_devinfo));
memcpy(data, &u->devinfo, sizeof(struct maple_devinfo));
return (0);
default:
return (EINVAL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mkbd.c,v 1.8 2001/05/26 19:04:40 marcus Exp $ */
/* $NetBSD: mkbd.c,v 1.9 2001/07/22 15:46:42 wiz Exp $ */
/*-
* Copyright (c) 2001 Marcus Comstedt
@ -275,7 +275,7 @@ mkbd_intr(sc, kbddata, sz)
else
KEY_DOWN(kbddata->key[j]);
bcopy(kbddata, &sc->sc_condition, sizeof(struct mkbd_condition));
memcpy(&sc->sc_condition, kbddata, sizeof(struct mkbd_condition));
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.3 2001/05/30 15:24:29 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.4 2001/07/22 15:46:41 wiz Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -553,13 +553,13 @@ initSH3(pc)
* process0 stack, page table area
*/
p = (char *)avail + (1 + UPAGES) * NBPG + NBPG * (1 + nkpde); /* XXX */
bzero(edata, p - edata);
memset(edata, 0, p - edata);
/*
* install trap handler
*/
bcopy(MonTrap100, Trap100Vec, MonTrap100_end - MonTrap100);
bcopy(MonTrap600, Trap600Vec, MonTrap600_end - MonTrap600);
memcpy(Trap100Vec, MonTrap100, MonTrap100_end - MonTrap100);
memcpy(Trap600Vec, MonTrap600, MonTrap600_end - MonTrap600);
__asm ("ldc %0, vbr" :: "r"(VBRINIT));
/*
@ -602,7 +602,7 @@ initSH3(pc)
/* Set TLB miss handler */
p = tlbmisshandler_stub;
x = tlbmisshandler_stub_end - p;
bcopy(p, TLBVECTOR, x);
memcpy(TLBVECTOR, p, x);
/*
* Activate MMU