bzero -> memset
This commit is contained in:
parent
03fd5e671e
commit
ce623a36cc
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ai.c,v 1.10 2001/03/10 20:04:30 jdolecek Exp $ */
|
||||
/* $NetBSD: if_ai.c,v 1.11 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -280,7 +280,7 @@ ai_match(parent, cf, aux)
|
||||
* Fill in just about enough of our local `ai_softc' for
|
||||
* ai_find_mem_size() to do its job.
|
||||
*/
|
||||
bzero(&asc, sizeof asc);
|
||||
memset(&asc, 0, sizeof asc);
|
||||
asc.sc_regt = iot;
|
||||
asc.sc_regh = ioh;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_eg.c,v 1.52 2000/12/14 06:59:02 thorpej Exp $ */
|
||||
/* $NetBSD: if_eg.c,v 1.53 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Dean Huxley <dean@fsa.ca>
|
||||
@ -276,7 +276,7 @@ egreadPCB(iot, ioh, pcb)
|
||||
bus_space_write_1(iot, ioh, EG_CONTROL,
|
||||
(bus_space_read_1(iot, ioh, EG_CONTROL) & ~EG_PCB_STAT) | EG_PCB_NULL);
|
||||
|
||||
bzero(pcb, EG_PCBLEN);
|
||||
memset(pcb, 0, EG_PCBLEN);
|
||||
|
||||
if (egreadPCBready(iot, ioh))
|
||||
return 1;
|
||||
|
@ -33,7 +33,7 @@
|
||||
* isic_isa.c - ISA bus frontend for i4b_isic driver
|
||||
* --------------------------------------------------
|
||||
*
|
||||
* $Id: isic_isa.c,v 1.3 2001/03/24 12:40:30 martin Exp $
|
||||
* $Id: isic_isa.c,v 1.4 2001/07/18 20:39:53 thorpej Exp $
|
||||
*
|
||||
* last edit-date: [Tue Jan 9 01:43:45 2001]
|
||||
*
|
||||
@ -148,7 +148,7 @@ isic_isa_probe(parent, cf, aux)
|
||||
}
|
||||
|
||||
/* setup MI attach args */
|
||||
bzero(&args, sizeof(args));
|
||||
memset(&args, 0, sizeof(args));
|
||||
args.ia_flags = flags;
|
||||
|
||||
/* if card type specified setup io map for that card */
|
||||
@ -814,7 +814,7 @@ isic_isa_attach(parent, self, aux)
|
||||
/* No card type given, try to figure ... */
|
||||
|
||||
/* setup MI attach args */
|
||||
bzero(&args, sizeof(args));
|
||||
memset(&args, 0, sizeof(args));
|
||||
args.ia_flags = flags;
|
||||
|
||||
/* Probe cards */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mcd.c,v 1.70 2001/02/10 12:16:34 taca Exp $ */
|
||||
/* $NetBSD: mcd.c,v 1.71 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -761,7 +761,7 @@ mcdgetdefaultlabel(sc, lp)
|
||||
struct disklabel *lp;
|
||||
{
|
||||
|
||||
bzero(lp, sizeof(struct disklabel));
|
||||
memset(lp, 0, sizeof(struct disklabel));
|
||||
|
||||
lp->d_secsize = sc->blksize;
|
||||
lp->d_ntracks = 1;
|
||||
@ -802,7 +802,7 @@ mcdgetdisklabel(sc)
|
||||
{
|
||||
struct disklabel *lp = sc->sc_dk.dk_label;
|
||||
|
||||
bzero(sc->sc_dk.dk_cpulabel, sizeof(struct cpu_disklabel));
|
||||
memset(sc->sc_dk.dk_cpulabel, 0, sizeof(struct cpu_disklabel));
|
||||
|
||||
mcdgetdefaultlabel(sc, lp);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pas.c,v 1.48 2001/05/15 15:00:04 lukem Exp $ */
|
||||
/* $NetBSD: pas.c,v 1.49 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -273,7 +273,7 @@ pasprobe(parent, match, aux)
|
||||
{
|
||||
struct pas_softc probesc, *sc = &probesc;
|
||||
|
||||
bzero(sc, sizeof *sc);
|
||||
memset(sc, 0, sizeof *sc);
|
||||
sc->sc_sbdsp.sc_dev.dv_cfdata = match;
|
||||
strcpy(sc->sc_sbdsp.sc_dev.dv_xname, "pas");
|
||||
return pasfind(parent, sc, aux, PASPROBE);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pckbc_isa.c,v 1.2 2000/03/23 07:01:35 thorpej Exp $ */
|
||||
/* $NetBSD: pckbc_isa.c,v 1.3 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998
|
||||
@ -154,7 +154,7 @@ pckbc_isa_attach(parent, self, aux)
|
||||
panic("pckbc_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 = iot;
|
||||
t->t_ioh_d = ioh_d;
|
||||
t->t_ioh_c = ioh_c;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pss.c,v 1.55 2001/04/26 17:57:47 thorpej Exp $ */
|
||||
/* $NetBSD: pss.c,v 1.56 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 John Brezak
|
||||
@ -700,7 +700,7 @@ pssprobe(parent, match, aux)
|
||||
{
|
||||
struct pss_softc probesc, *sc = &probesc;
|
||||
|
||||
bzero(sc, sizeof *sc);
|
||||
memset(sc, 0, sizeof *sc);
|
||||
sc->sc_dev.dv_cfdata = match;
|
||||
strcpy(sc->sc_dev.dv_xname, "pas");
|
||||
return pssfind(parent, sc, aux);
|
||||
@ -813,7 +813,7 @@ spprobe(parent, match, aux)
|
||||
{
|
||||
struct ad1848_isa_softc probesc, *sc = &probesc;
|
||||
|
||||
bzero(sc, sizeof *sc);
|
||||
memset(sc, 0, sizeof *sc);
|
||||
sc->sc_ad1848.sc_dev.dv_cfdata = match;
|
||||
return spfind(parent, sc, aux);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: satlink.c,v 1.11 2000/07/06 02:02:49 thorpej Exp $ */
|
||||
/* $NetBSD: satlink.c,v 1.12 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -241,7 +241,7 @@ satlinkopen(dev, flags, fmt, p)
|
||||
sc->sc_uptr = 0;
|
||||
sc->sc_sptr = 0;
|
||||
sc->sc_lastresid = sc->sc_bufsize;
|
||||
bzero(sc->sc_buf, sc->sc_bufsize);
|
||||
memset(sc->sc_buf, 0, sc->sc_bufsize);
|
||||
error = isa_dmastart(sc->sc_ic, sc->sc_drq, sc->sc_buf,
|
||||
sc->sc_bufsize, NULL, DMAMODE_READ|DMAMODE_LOOP, BUS_DMA_WAITOK);
|
||||
if (error)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sb_isa.c,v 1.22 1999/09/07 00:49:41 soren Exp $ */
|
||||
/* $NetBSD: sb_isa.c,v 1.23 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
@ -81,7 +81,7 @@ sb_isa_match(parent, match, aux)
|
||||
{
|
||||
struct sbdsp_softc probesc, *sc = &probesc;
|
||||
|
||||
bzero(sc, sizeof *sc);
|
||||
memset(sc, 0, sizeof *sc);
|
||||
sc->sc_dev.dv_cfdata = match;
|
||||
strcpy(sc->sc_dev.dv_xname, "sb");
|
||||
return sbfind(parent, sc, aux);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wds.c,v 1.42 2001/04/25 17:53:36 bouyer Exp $ */
|
||||
/* $NetBSD: wds.c,v 1.43 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -540,7 +540,7 @@ wds_init_scb(sc, scb)
|
||||
* XXX SCB inits here?
|
||||
*/
|
||||
|
||||
bzero(scb, sizeof(struct wds_scb));
|
||||
memset(scb, 0, sizeof(struct wds_scb));
|
||||
|
||||
/*
|
||||
* Create DMA maps for this SCB.
|
||||
@ -625,7 +625,7 @@ wds_create_scbs(sc, mem, size)
|
||||
}
|
||||
|
||||
have_mem:
|
||||
bzero(scb, size);
|
||||
memset(scb, 0, size);
|
||||
while (size > sizeof(struct wds_scb) && sc->sc_numscbs < WDS_SCB_MAX) {
|
||||
error = wds_init_scb(sc, scb);
|
||||
if (error) {
|
||||
@ -1042,7 +1042,7 @@ wds_inquire_setup_information(sc)
|
||||
scb->xs = NULL;
|
||||
scb->timeout = 40;
|
||||
|
||||
bzero(&scb->cmd, sizeof scb->cmd);
|
||||
memset(&scb->cmd, 0, sizeof scb->cmd);
|
||||
scb->cmd.write = 0x80;
|
||||
scb->cmd.opcode = WDSX_GETFIRMREV;
|
||||
|
||||
@ -1156,7 +1156,7 @@ wds_scsipi_request(chan, req, arg)
|
||||
scb->timeout = xs->timeout;
|
||||
|
||||
/* Zero out the command structure. */
|
||||
bzero(&scb->cmd, sizeof scb->cmd);
|
||||
memset(&scb->cmd, 0, sizeof scb->cmd);
|
||||
bcopy(xs->cmd, &scb->cmd.scb,
|
||||
xs->cmdlen < 12 ? xs->cmdlen : 12);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wss_isa.c,v 1.9 1999/10/25 19:39:54 drochner Exp $ */
|
||||
/* $NetBSD: wss_isa.c,v 1.10 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 John Brezak
|
||||
@ -92,7 +92,7 @@ wss_isa_probe(parent, match, aux)
|
||||
struct wss_softc probesc, *sc = &probesc;
|
||||
struct ad1848_softc *ac = (struct ad1848_softc *)&sc->sc_ad1848;
|
||||
|
||||
bzero(sc, sizeof *sc);
|
||||
memset(sc, 0, sizeof *sc);
|
||||
ac->sc_dev.dv_cfdata = match;
|
||||
if (wssfind(parent, sc, aux)) {
|
||||
bus_space_unmap(sc->sc_iot, sc->sc_ioh, WSS_CODEC);
|
||||
|
Loading…
Reference in New Issue
Block a user