bzero -> memset

This commit is contained in:
thorpej 2001-07-12 23:25:39 +00:00
parent 8210f5a2f2
commit 294259060c
14 changed files with 49 additions and 49 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ade.c,v 1.9 2001/06/13 10:46:00 wiz Exp $ */
/* $NetBSD: if_ade.c,v 1.10 2001/07/12 23:25:39 thorpej Exp $ */
/*
* NOTE: this version of if_de was modified for bounce buffers prior
@ -3046,7 +3046,7 @@ tulip_addr_filter(
* go into hash perfect mode (512 bit multicast
* hash and one perfect hardware).
*/
bzero(sc->tulip_setupdata, sizeof(sc->tulip_setupdata));
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) {
@ -4610,11 +4610,11 @@ tulip_initring(
ri->ri_max = ndescs;
(void)lcl_dma_ram_next(16); /* superstitiously avoid the origin */
ri->ri_first = (tulip_desc_t *)lcl_dma_ram_next(dsize);
bzero(ri->ri_first, dsize);
memset(ri->ri_first, 0, dsize);
for(i=0; i<ndescs; ++i) {
kvalist[i] = lcl_dma_ram_next(TULIP_XX_BUFLEN);
BEGIN(ri->ri_first+i);
bzero(&t, sizeof(t));
memset(&t, 0, sizeof(t));
t.d_addr1 = a12map(TULIP_KVATOPHYS(sc,kvalist[i]));
END(ri->ri_first+i);
}
@ -4706,7 +4706,7 @@ tulip_initring( /* the usual case */
ri->ri_max = ndescs;
ri->ri_first = descs;
ri->ri_last = ri->ri_first + ri->ri_max;
bzero((caddr_t) ri->ri_first, sizeof(ri->ri_first[0]) * ri->ri_max);
memset((caddr_t) ri->ri_first, 0, sizeof(ri->ri_first[0]) * ri->ri_max);
ri->ri_last[-1].d_flag = TULIP_DFLAG_ENDRING;
}
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: dec_kn8ae.c,v 1.25 2001/04/25 17:53:05 bouyer Exp $ */
/* $NetBSD: dec_kn8ae.c,v 1.26 2001/07/12 23:25:39 thorpej Exp $ */
/*
* Copyright (c) 1997 by Matthew Jacob
@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: dec_kn8ae.c,v 1.25 2001/04/25 17:53:05 bouyer Exp $");
__KERNEL_RCSID(0, "$NetBSD: dec_kn8ae.c,v 1.26 2001/07/12 23:25:39 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -491,7 +491,7 @@ kn8ae_mcheck(mces, type, logout, framep)
get_dwlpx_regs = 0;
ptr = NULL;
bzero(mcs, sizeof (mcs));
memset(mcs, 0, sizeof (mcs));
hdr = (mc_hdr_ev5 *) logout;
mptr = (mc_uc_ev5 *) (logout + sizeof (*hdr));

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.245 2001/06/02 18:09:08 chs Exp $ */
/* $NetBSD: machdep.c,v 1.246 2001/07/12 23:25:39 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -74,7 +74,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.245 2001/06/02 18:09:08 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.246 2001/07/12 23:25:39 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1196,7 +1196,7 @@ cpu_dump()
dump = bdevsw[major(dumpdev)].d_dump;
bzero(buf, sizeof buf);
memset(buf, 0, sizeof buf);
segp = (kcore_seg_t *)buf;
cpuhdrp = (cpu_kcore_hdr_t *)&buf[ALIGN(sizeof(*segp))];
memsegp = (phys_ram_seg_t *)&buf[ ALIGN(sizeof(*segp)) +
@ -1544,8 +1544,8 @@ sendsig(catcher, sig, mask, code)
bcopy(&p->p_addr->u_pcb.pcb_fp, (struct fpreg *)ksc.sc_fpregs,
sizeof(struct fpreg));
ksc.sc_fp_control = alpha_read_fp_c(p);
bzero(ksc.sc_reserved, sizeof ksc.sc_reserved); /* XXX */
bzero(ksc.sc_xxx, sizeof ksc.sc_xxx); /* XXX */
memset(ksc.sc_reserved, 0, sizeof ksc.sc_reserved); /* XXX */
memset(ksc.sc_xxx, 0, sizeof ksc.sc_xxx); /* XXX */
/* Save signal stack. */
ksc.sc_onstack = p->p_sigctx.ps_sigstk.ss_flags & SS_ONSTACK;
@ -1773,9 +1773,9 @@ setregs(p, pack, stack)
for (i = 0; i < FRAME_SIZE; i++)
tfp->tf_regs[i] = 0xbabefacedeadbeef;
#else
bzero(tfp->tf_regs, FRAME_SIZE * sizeof tfp->tf_regs[0]);
memset(tfp->tf_regs, 0, FRAME_SIZE * sizeof tfp->tf_regs[0]);
#endif
bzero(&p->p_addr->u_pcb.pcb_fp, sizeof p->p_addr->u_pcb.pcb_fp);
memset(&p->p_addr->u_pcb.pcb_fp, 0, sizeof p->p_addr->u_pcb.pcb_fp);
alpha_pal_wrusp(stack);
tfp->tf_regs[FRAME_PS] = ALPHA_PSL_USERSET;
tfp->tf_regs[FRAME_PC] = pack->ep_entry & ~3;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.29 2001/01/07 05:42:54 thorpej Exp $ */
/* $NetBSD: mem.c,v 1.30 2001/07/12 23:25:39 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -46,7 +46,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.29 2001/01/07 05:42:54 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.30 2001/07/12 23:25:39 thorpej Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@ -175,7 +175,7 @@ kmemphys:
if (zeropage == NULL) {
zeropage = (caddr_t)
malloc(NBPG, M_TEMP, M_WAITOK);
bzero(zeropage, NBPG);
memset(zeropage, 0, NBPG);
}
c = min(iov->iov_len, NBPG);
error = uiomove(zeropage, c, uio);

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.68 2001/04/26 03:10:45 ross Exp $ */
/* $NetBSD: vm_machdep.c,v 1.69 2001/07/12 23:25:39 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.68 2001/04/26 03:10:45 ross Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.69 2001/07/12 23:25:39 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -71,7 +71,7 @@ cpu_coredump(struct proc *p, struct vnode *vp, struct ucred *cred,
fpusave_proc(p, 1);
cpustate.md_fpstate = p->p_addr->u_pcb.pcb_fp;
} else
bzero(&cpustate.md_fpstate, sizeof(cpustate.md_fpstate));
memset(&cpustate.md_fpstate, 0, sizeof(cpustate.md_fpstate));
CORE_SETMAGIC(cseg, CORESEGMAGIC, MID_MACHINE, CORE_CPU);
cseg.c_addr = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: bus_dma.c,v 1.46 2001/05/26 21:27:03 chs Exp $ */
/* $NetBSD: bus_dma.c,v 1.47 2001/07/12 23:25:40 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -39,7 +39,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.46 2001/05/26 21:27:03 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.47 2001/07/12 23:25:40 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -91,7 +91,7 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments,
(flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL)
return (ENOMEM);
bzero(mapstore, mapsize);
memset(mapstore, 0, mapsize);
map = (struct alpha_bus_dmamap *)mapstore;
map->_dm_size = size;
map->_dm_segcnt = nsegments;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sgmap_common.c,v 1.16 2001/01/03 20:29:58 thorpej Exp $ */
/* $NetBSD: sgmap_common.c,v 1.17 2001/07/12 23:25:40 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -39,7 +39,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: sgmap_common.c,v 1.16 2001/01/03 20:29:58 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: sgmap_common.c,v 1.17 2001/07/12 23:25:40 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -134,7 +134,7 @@ alpha_sgmap_init(bus_dma_tag_t t, struct alpha_sgmap *sgmap, const char *name,
alpha_sgmap_prefetch_spill_page_pa = seg.ds_addr;
alpha_sgmap_prefetch_spill_page_va =
ALPHA_PHYS_TO_K0SEG(alpha_sgmap_prefetch_spill_page_pa);
bzero((caddr_t)alpha_sgmap_prefetch_spill_page_va, NBPG);
memset((caddr_t)alpha_sgmap_prefetch_spill_page_va, 0, NBPG);
}
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sgmap_typedep.c,v 1.14 2001/01/03 20:29:58 thorpej Exp $ */
/* $NetBSD: sgmap_typedep.c,v 1.15 2001/07/12 23:25:40 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
__KERNEL_RCSID(0, "$NetBSD: sgmap_typedep.c,v 1.14 2001/01/03 20:29:58 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: sgmap_typedep.c,v 1.15 2001/07/12 23:25:40 thorpej Exp $");
#include "opt_ddb.h"
@ -271,7 +271,7 @@ __C(SGMAP_TYPE,_unload)(bus_dma_tag_t t, bus_dmamap_t map,
if (panicstr == NULL) {
sl = &__C(SGMAP_TYPE,_log)[__C(SGMAP_TYPE,_log_next)];
bzero(sl, sizeof(*sl));
memset(sl, 0, sizeof(*sl));
sl->sl_op = 0;
sl->sl_sgmap = sgmap;
sl->sl_sgva = map->_dm_sgva;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pckbc_jensenio.c,v 1.1 2000/07/12 20:36:10 thorpej Exp $ */
/* $NetBSD: pckbc_jensenio.c,v 1.2 2001/07/12 23:25:40 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pckbc_jensenio.c,v 1.1 2000/07/12 20:36:10 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: pckbc_jensenio.c,v 1.2 2001/07/12 23:25:40 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -124,7 +124,7 @@ pckbc_jensenio_attach(struct device *parent, struct device *self, void *aux)
panic("pckbc_jensenio_attach: couldn't map");
t = malloc(sizeof(struct pckbc_internal), M_DEVBUF, M_WAITOK);
bzero(t, sizeof(struct pckbc_internal));
memset(t, 0, sizeof(struct pckbc_internal));
t->t_iot = ja->ja_iot;
t->t_ioh_d = ioh_d;
t->t_ioh_c = ioh_c;

View File

@ -1,4 +1,4 @@
/* $NetBSD: a12c.c,v 1.8 2000/06/29 08:58:45 mrg Exp $ */
/* $NetBSD: a12c.c,v 1.9 2001/07/12 23:25:40 thorpej Exp $ */
/* [Notice revision 2.2]
* Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@ -38,7 +38,7 @@
#include "opt_avalon_a12.h" /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: a12c.c,v 1.8 2000/06/29 08:58:45 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: a12c.c,v 1.9 2001/07/12 23:25:40 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -144,13 +144,13 @@ a12cattach(parent, self, aux)
a12c_init(ccp, 1);
/* XXX print chipset information */
printf(": driver %s over logic %x\n", "$Revision: 1.8 $",
printf(": driver %s over logic %x\n", "$Revision: 1.9 $",
A12_ALL_EXTRACT(REGVAL(A12_VERS)));
pci_a12_pickintr(ccp);
clockfns = &noclock_fns; /* XXX? */
bzero(&pba, sizeof(pba));
memset(&pba, 0, sizeof(pba));
pba.pba_busname = "pci";
pba.pba_iot = 0;
pba.pba_memt = ccp->ac_memt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tsc.c,v 1.5 2000/11/29 06:30:09 thorpej Exp $ */
/* $NetBSD: tsc.c,v 1.6 2001/07/12 23:25:40 thorpej Exp $ */
/*-
* Copyright (c) 1999 by Ross Harvey. All rights reserved.
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.5 2000/11/29 06:30:09 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.6 2001/07/12 23:25:40 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -133,7 +133,7 @@ void tscattach(parent, self, aux)
}
printf(", Dchip 0 rev %d\n", (int)LDQP(TS_D_DREV) & 0xf);
bzero(&tsp, sizeof tsp);
memset(&tsp, 0, sizeof tsp);
tsp.tsp_name = "tsp";
config_found(self, &tsp, NULL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pckbc_sableio.c,v 1.1 2000/12/21 20:51:57 thorpej Exp $ */
/* $NetBSD: pckbc_sableio.c,v 1.2 2001/07/12 23:25:40 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pckbc_sableio.c,v 1.1 2000/12/21 20:51:57 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: pckbc_sableio.c,v 1.2 2001/07/12 23:25:40 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -123,7 +123,7 @@ pckbc_sableio_attach(struct device *parent, struct device *self, void *aux)
panic("pckbc_sableio_attach: couldn't map");
t = malloc(sizeof(struct pckbc_internal), M_DEVBUF, M_WAITOK);
bzero(t, sizeof(struct pckbc_internal));
memset(t, 0, sizeof(struct pckbc_internal));
t->t_iot = sa->sa_iot;
t->t_ioh_d = ioh_d;
t->t_ioh_c = ioh_c;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tc_dma_3000_500.c,v 1.10 2000/06/29 09:02:58 mrg Exp $ */
/* $NetBSD: tc_dma_3000_500.c,v 1.11 2001/07/12 23:25:41 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -39,7 +39,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: tc_dma_3000_500.c,v 1.10 2000/06/29 09:02:58 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: tc_dma_3000_500.c,v 1.11 2001/07/12 23:25:41 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -98,7 +98,7 @@ tc_dma_init_3000_500(nslots)
tc_dma_slot_info = malloc(sisize, M_DEVBUF, M_NOWAIT);
if (tc_dma_slot_info == NULL)
panic("tc_dma_init: can't allocate per-slot DMA info");
bzero(tc_dma_slot_info, sisize);
memset(tc_dma_slot_info, 0, sisize);
/* Default all slots to direct-mapped. */
for (i = 0; i < nslots; i++)

View File

@ -1,4 +1,4 @@
/* $NetBSD: tlsb.c,v 1.21 2001/04/21 16:27:11 thorpej Exp $ */
/* $NetBSD: tlsb.c,v 1.22 2001/07/12 23:25:41 thorpej Exp $ */
/*
* Copyright (c) 1997 by Matthew Jacob
* NASA AMES Research Center.
@ -39,7 +39,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: tlsb.c,v 1.21 2001/04/21 16:27:11 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: tlsb.c,v 1.22 2001/07/12 23:25:41 thorpej Exp $");
#include "opt_multiprocessor.h"
@ -276,7 +276,7 @@ tlsb_node_type_str(dtype)
return ("Dual CPU, 16MB cache");
default:
bzero(tlsb_line, sizeof(tlsb_line));
memset(tlsb_line, 0, sizeof(tlsb_line));
sprintf(tlsb_line, "unknown, dtype 0x%x", dtype);
return (tlsb_line);
}