bzero -> memset

bcopy -> memcpy
bcmp -> memcmp
This commit is contained in:
scw 2001-07-07 07:51:37 +00:00
parent b1a5e525b8
commit ff267f1e06
9 changed files with 43 additions and 43 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie.c,v 1.11 2001/05/31 18:46:07 scw Exp $ */
/* $NetBSD: if_ie.c,v 1.12 2001/07/07 07:51:37 scw Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -192,7 +192,7 @@ ie_copyin(sc, dst, offset, size)
bus_space_read_region_1(sc->bt, sc->bh, offset, dst, size);
#else
/* A minor optimisation ;-) */
bcopy((void *) ((u_long) sc->bh + (u_long) offset), dst, size);
memcpy(dst, (void *) ((u_long) sc->bh + (u_long) offset), size);
#endif
}
@ -210,7 +210,7 @@ ie_copyout(sc, src, offset, size)
bus_space_write_region_1(sc->bt, sc->bh, offset, src, size);
#else
/* A minor optimisation ;-) */
bcopy(src, (void *) ((u_long) sc->bh + (u_long) offset), size);
memcpy((void *) ((u_long) sc->bh + (u_long) offset), src, size);
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbic.c,v 1.16 2001/04/25 17:53:16 bouyer Exp $ */
/* $NetBSD: sbic.c,v 1.17 2001/07/07 07:51:37 scw Exp $ */
/*
* Changes Copyright (c) 1996 Steve Woodford
@ -413,7 +413,7 @@ sbic_scsi_request(chan, req, arg)
acb->sc_kv.dc_addr = xs->data;
acb->sc_kv.dc_count = xs->datalen;
acb->pa_addr = xs->data ? (char *)kvtop((caddr_t)xs->data) : 0;
bcopy(xs->cmd, &acb->cmd, xs->cmdlen);
memcpy(&acb->cmd, xs->cmd, xs->cmdlen);
if ( flags & XS_CTL_POLL ) {
/*
@ -814,14 +814,14 @@ sbicinit(dev)
dev->sc_xs = NULL;
acb = dev->sc_acb;
bzero(acb, sizeof(dev->sc_acb));
memset(acb, 0, sizeof(dev->sc_acb));
for (i = 0; i < sizeof(dev->sc_acb) / sizeof(*acb); i++) {
TAILQ_INSERT_TAIL(&dev->free_list, acb, chain);
acb++;
}
bzero(dev->sc_tinfo, sizeof(dev->sc_tinfo));
memset(dev->sc_tinfo, 0, sizeof(dev->sc_tinfo));
#ifdef DEBUG
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: zs.c,v 1.27 2001/05/31 18:46:08 scw Exp $ */
/* $NetBSD: zs.c,v 1.28 2001/07/07 07:51:38 scw Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -159,14 +159,14 @@ zs_config(zsc, zs, vector, pclk)
* adjust the console channel pointer.
*/
if (zsc_args.hwflags & ZS_HWFLAG_CONSOLE) {
bcopy(zs_conschan, cs, sizeof(struct zs_chanstate));
memcpy(cs, zs_conschan, sizeof(struct zs_chanstate));
zs_conschan = cs;
} else {
zc = (channel == 0) ? &zs->zs_chan_a : &zs->zs_chan_b;
cs->cs_reg_csr = zc->zc_csr;
cs->cs_reg_data = zc->zc_data;
bcopy(zs_init_reg, cs->cs_creg, 16);
bcopy(zs_init_reg, cs->cs_preg, 16);
memcpy(cs->cs_creg, zs_init_reg, 16);
memcpy(cs->cs_preg, zs_init_reg, 16);
cs->cs_defspeed = zs_defspeed[zsc_unit][channel];
}
@ -537,7 +537,7 @@ zs_cnconfig(zsc_unit, channel, zs, pclk)
cs->cs_reg_data = zc->zc_data;
/* Initialize the pending registers. */
bcopy(zs_init_reg, cs->cs_preg, 16);
memcpy(cs->cs_preg, zs_init_reg, 16);
cs->cs_preg[5] |= (ZSWR5_DTR | ZSWR5_RTS);
#if 0

View File

@ -1,4 +1,4 @@
/* $NetBSD: bus_dma.c,v 1.15 2001/05/26 21:27:10 chs Exp $ */
/* $NetBSD: bus_dma.c,v 1.16 2001/07/07 07:51:38 scw Exp $ */
/*
* This file was taken from from next68k/dev/bus_dma.c, which was originally
@ -46,7 +46,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.15 2001/05/26 21:27:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.16 2001/07/07 07:51:38 scw Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -107,7 +107,7 @@ _bus_dmamap_create(t, size, nsegments, maxsegsz, boundary, flags, dmamp)
(flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL)
return (ENOMEM);
bzero(mapstore, mapsize);
memset(mapstore, 0, mapsize);
map = (struct mvme68k_bus_dmamap *)mapstore;
map->_dm_size = size;
map->_dm_segcnt = nsegments;

View File

@ -1,4 +1,4 @@
/* $NetBSD: disksubr.c,v 1.20 2000/11/20 08:24:17 chs Exp $ */
/* $NetBSD: disksubr.c,v 1.21 2001/07/07 07:51:38 scw Exp $ */
/*
* Copyright (c) 1995 Dale Rahn.
@ -91,7 +91,7 @@ readdisklabel(dev, strat, lp, clp)
if (biowait(bp)) {
msg = "cpu_disklabel read error\n";
} else {
bcopy(bp->b_data, clp, sizeof (struct cpu_disklabel));
memcpy(clp, bp->b_data, sizeof (struct cpu_disklabel));
}
brelse(bp);
@ -212,7 +212,7 @@ writedisklabel(dev, strat, lp, clp)
if ( (error = biowait(bp)) != 0 ) {
/* nothing */
} else {
bcopy(bp->b_data, clp, sizeof(struct cpu_disklabel));
memcpy(clp, bp->b_data, sizeof(struct cpu_disklabel));
}
brelse(bp);
@ -234,7 +234,7 @@ writedisklabel(dev, strat, lp, clp)
/* obtain buffer to scrozz drive with */
bp = geteblk((int)lp->d_secsize);
bcopy(clp, bp->b_data, sizeof(struct cpu_disklabel));
memcpy(bp->b_data, clp, sizeof(struct cpu_disklabel));
/* request no partition relocation by driver on I/O operations */
bp->b_dev = dev;
@ -353,9 +353,9 @@ bsdtocpulabel(lp, clp)
clp->sbsize = lp->d_sbsize;
clp->checksum = lp->d_checksum;
/* note: assume at least 4 partitions */
bcopy(&lp->d_partitions[0], clp->vid_4, sizeof(struct partition) * 4);
bzero(clp->cfg_4, sizeof(struct partition) * 12);
bcopy(&lp->d_partitions[4], clp->cfg_4, sizeof(struct partition)
memcpy(clp->vid_4, &lp->d_partitions[0], sizeof(struct partition) * 4);
memset(clp->cfg_4, 0, sizeof(struct partition) * 12);
memcpy(clp->cfg_4, &lp->d_partitions[4], sizeof(struct partition)
* ((MAXPARTITIONS < 16) ? (MAXPARTITIONS - 4) : 12));
/*
@ -363,14 +363,14 @@ bsdtocpulabel(lp, clp)
* see disklabel.h for more details
* [note: this used to be handled by 'wrtvid']
*/
bcopy(VID_ID, clp->vid_id, sizeof(clp->vid_id));
memcpy(clp->vid_id, VID_ID, sizeof(clp->vid_id));
clp->vid_oss = VID_OSS;
clp->vid_osl = VID_OSL;
clp->vid_osa_u = VID_OSAU;
clp->vid_osa_l = VID_OSAL;
clp->vid_cas = VID_CAS;
clp->vid_cal = VID_CAL;
bcopy(VID_MOT, clp->vid_mot, sizeof(clp->vid_mot));
memcpy(clp->vid_mot, VID_MOT, sizeof(clp->vid_mot));
clp->cfg_rec = CFG_REC;
clp->cfg_psm = CFG_PSM;
}
@ -437,8 +437,8 @@ cputobsdlabel(lp, clp)
lp->d_bbsize = clp->bbsize;
lp->d_sbsize = clp->sbsize;
/* note: assume at least 4 partitions */
bcopy(clp->vid_4, &lp->d_partitions[0], sizeof(struct partition) * 4);
bcopy(clp->cfg_4, &lp->d_partitions[4], sizeof(struct partition)
memcpy(&lp->d_partitions[0], clp->vid_4, sizeof(struct partition) * 4);
memcpy(&lp->d_partitions[4], clp->cfg_4, sizeof(struct partition)
* ((MAXPARTITIONS < 16) ? (MAXPARTITIONS - 4) : 12));
lp->d_checksum = 0;
lp->d_checksum = dkcksum(lp);

View File

@ -1,4 +1,4 @@
/* $NetBSD: isr.c,v 1.23 2001/07/06 19:00:14 scw Exp $ */
/* $NetBSD: isr.c,v 1.24 2001/07/07 07:51:38 scw Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -227,7 +227,7 @@ isrunlink_vectored(vec)
#endif
vectab[vec] = badtrap;
bzero(&isr_vectored[vec - ISRVECTORED], sizeof(struct isr_vectored));
memset(&isr_vectored[vec - ISRVECTORED], 0, sizeof(struct isr_vectored));
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.83 2001/06/10 16:48:19 scw Exp $ */
/* $NetBSD: machdep.c,v 1.84 2001/07/07 07:51:38 scw Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -630,11 +630,11 @@ identifycpu()
char fpu_str[16];
int len = 0;
bzero(cpu_model, sizeof(cpu_model));
bzero(board_str, sizeof(board_str));
bzero(cpu_str, sizeof(cpu_str));
bzero(mmu_str, sizeof(mmu_str));
bzero(fpu_str, sizeof(cpu_str));
memset(cpu_model, 0, sizeof(cpu_model));
memset(board_str, 0, sizeof(board_str));
memset(cpu_str, 0, sizeof(cpu_str));
memset(mmu_str, 0, sizeof(mmu_str));
memset(fpu_str, 0, sizeof(cpu_str));
/* Fill in the CPU string. */
switch (cputype) {
@ -851,7 +851,7 @@ cpu_init_kcore_hdr()
int i;
extern char end[];
bzero(&cpu_kcore_hdr, sizeof(cpu_kcore_hdr));
memset(&cpu_kcore_hdr, 0, sizeof(cpu_kcore_hdr));
/*
* Initialize the `dispatcher' portion of the header.
@ -955,7 +955,7 @@ cpu_dump(dump, blknop)
CORE_SETMAGIC(*kseg, KCORE_MAGIC, MID_MACHINE, CORE_CPU);
kseg->c_size = dbtob(1) - ALIGN(sizeof(kcore_seg_t));
bcopy(&cpu_kcore_hdr, chdr, sizeof(cpu_kcore_hdr_t));
memcpy(chdr, &cpu_kcore_hdr, sizeof(cpu_kcore_hdr_t));
error = (*dump)(dumpdev, *blknop, (caddr_t)buf, sizeof(buf));
*blknop += btodb(sizeof(buf));
return (error);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.62 2001/06/02 18:09:16 chs Exp $ */
/* $NetBSD: pmap.c,v 1.63 2001/07/07 07:51:39 scw Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -748,7 +748,7 @@ pmap_create()
("pmap_create()\n"));
pmap = pool_get(&pmap_pmap_pool, PR_WAITOK);
bzero(pmap, sizeof(*pmap));
memset(pmap, 0, sizeof(*pmap));
pmap_pinit(pmap);
return (pmap);
}
@ -1719,7 +1719,7 @@ ok:
* pmap_zero_page: [ INTERFACE ]
*
* Zero the specified (machine independent) page by mapping the page
* into virtual memory and using bzero to clear its contents, one
* into virtual memory and using memset to clear its contents, one
* machine dependent page at a time.
*
* Note: WE DO NOT CURRENTLY LOCK THE TEMPORARY ADDRESSES!
@ -2453,7 +2453,7 @@ pmap_enter_ptpage(pmap, va)
panic("enter: out of address space"); /* XXX */
pmap->pm_stfree &= ~l2tobm(ix);
addr = (caddr_t)&pmap->pm_stab[ix*SG4_LEV2SIZE];
bzero(addr, SG4_LEV2SIZE*sizeof(st_entry_t));
memset(addr, 0, SG4_LEV2SIZE*sizeof(st_entry_t));
addr = (caddr_t)&pmap->pm_stpa[ix*SG4_LEV2SIZE];
*ste = (u_int)addr | SG_RW | SG_U | SG_V;
@ -2501,7 +2501,7 @@ pmap_enter_ptpage(pmap, va)
kpt->kpt_next = kpt_used_list;
kpt_used_list = kpt;
ptpa = kpt->kpt_pa;
bzero((caddr_t)kpt->kpt_va, NBPG);
memset((caddr_t)kpt->kpt_va, 0, NBPG);
pmap_enter(pmap, va, ptpa, VM_PROT_DEFAULT,
VM_PROT_DEFAULT|PMAP_WIRED);
pmap_update();

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.59 2001/07/06 19:00:14 scw Exp $ */
/* $NetBSD: trap.c,v 1.60 2001/07/07 07:51:39 scw Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -711,7 +711,7 @@ char wberrstr[] =
#endif
/*
* Because calling bcopy() for 16 bytes is *way* too much overhead ...
* Because calling memcpy() for 16 bytes is *way* too much overhead ...
*/
static __inline void fastcopy16(u_int *, u_int *);
static __inline void