bcopy -> memcpy, bzero -> memset
This commit is contained in:
parent
2b351e4a6f
commit
edeeafe82b
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: zs.c,v 1.4 2001/07/08 20:30:14 thorpej Exp $ */
|
/* $NetBSD: zs.c,v 1.5 2001/07/08 21:04:50 thorpej Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996, 2000 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996, 2000 The NetBSD Foundation, Inc.
|
||||||
|
@ -256,8 +256,8 @@ zs_hpc_attach(parent, self, aux)
|
||||||
}
|
}
|
||||||
ch->cs_bustag = zsc->zsc_bustag;
|
ch->cs_bustag = zsc->zsc_bustag;
|
||||||
|
|
||||||
bcopy(zs_init_reg, cs->cs_creg, 16);
|
memcpy(cs->cs_creg, zs_init_reg, 16);
|
||||||
bcopy(zs_init_reg, cs->cs_preg, 16);
|
memcpy(cs->cs_preg, zs_init_reg, 16);
|
||||||
|
|
||||||
zsc_args.hwflags = 0;
|
zsc_args.hwflags = 0;
|
||||||
zsc_args.consdev = NULL;
|
zsc_args.consdev = NULL;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: zs_kgdb.c,v 1.2 2001/07/07 23:13:25 wdk Exp $ */
|
/* $NetBSD: zs_kgdb.c,v 1.3 2001/07/08 21:04:50 thorpej Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||||
|
@ -108,7 +108,7 @@ zs_setparam(cs, iena, rate)
|
||||||
{
|
{
|
||||||
int s, tconst;
|
int s, tconst;
|
||||||
|
|
||||||
bcopy(zs_kgdb_regs, cs->cs_preg, 16);
|
memcpy(cs->cs_preg, zs_kgdb_regs, 16);
|
||||||
|
|
||||||
if (iena) {
|
if (iena) {
|
||||||
cs->cs_preg[1] = ZSWR1_RIE | ZSWR1_SIE;
|
cs->cs_preg[1] = ZSWR1_RIE | ZSWR1_SIE;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: if_sq.c,v 1.6 2001/07/08 20:57:34 thorpej Exp $ */
|
/* $NetBSD: if_sq.c,v 1.7 2001/07/08 21:04:51 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Rafal K. Boni
|
* Copyright (c) 2001 Rafal K. Boni
|
||||||
|
@ -144,7 +144,7 @@ void sq_trace_dump(struct sq_softc* sc);
|
||||||
sq_trace[sq_trace_idx].status = (stat); \
|
sq_trace[sq_trace_idx].status = (stat); \
|
||||||
sq_trace[sq_trace_idx].freebuf = (free); \
|
sq_trace[sq_trace_idx].freebuf = (free); \
|
||||||
if (++sq_trace_idx == SQ_TRACEBUF_SIZE) { \
|
if (++sq_trace_idx == SQ_TRACEBUF_SIZE) { \
|
||||||
bzero(&sq_trace, sizeof(sq_trace)); \
|
memset(&sq_trace, 0, sizeof(sq_trace)); \
|
||||||
sq_trace_idx = 0; \
|
sq_trace_idx = 0; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
@ -221,7 +221,7 @@ sq_attach(struct device *parent, struct device *self, void *aux)
|
||||||
goto fail_3;
|
goto fail_3;
|
||||||
}
|
}
|
||||||
|
|
||||||
bzero(sc->sc_control, sizeof(struct sq_control));
|
memset(sc->sc_control, 0, sizeof(struct sq_control));
|
||||||
|
|
||||||
/* Create transmit buffer DMA maps */
|
/* Create transmit buffer DMA maps */
|
||||||
for (i = 0; i < SQ_NTXDESC; i++) {
|
for (i = 0; i < SQ_NTXDESC; i++) {
|
||||||
|
@ -288,7 +288,7 @@ sq_attach(struct device *parent, struct device *self, void *aux)
|
||||||
printf("%s: Ethernet address %s\n", sc->sc_dev.dv_xname,
|
printf("%s: Ethernet address %s\n", sc->sc_dev.dv_xname,
|
||||||
ether_sprintf(sc->sc_enaddr));
|
ether_sprintf(sc->sc_enaddr));
|
||||||
|
|
||||||
bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
|
strcpy(ifp->if_xname, sc->sc_dev.dv_xname);
|
||||||
ifp->if_softc = sc;
|
ifp->if_softc = sc;
|
||||||
ifp->if_mtu = ETHERMTU;
|
ifp->if_mtu = ETHERMTU;
|
||||||
ifp->if_init = sq_init;
|
ifp->if_init = sq_init;
|
||||||
|
@ -302,7 +302,7 @@ sq_attach(struct device *parent, struct device *self, void *aux)
|
||||||
if_attach(ifp);
|
if_attach(ifp);
|
||||||
ether_ifattach(ifp, sc->sc_enaddr);
|
ether_ifattach(ifp, sc->sc_enaddr);
|
||||||
|
|
||||||
bzero(&sq_trace, sizeof(sq_trace));
|
memset(&sq_trace, 0, sizeof(sq_trace));
|
||||||
/* Done! */
|
/* Done! */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -737,7 +737,7 @@ sq_watchdog(struct ifnet *ifp)
|
||||||
|
|
||||||
sq_trace_dump(sc);
|
sq_trace_dump(sc);
|
||||||
|
|
||||||
bzero(&sq_trace, sizeof(sq_trace));
|
memset(&sq_trace, 0, sizeof(sq_trace));
|
||||||
sq_trace_idx = 0;
|
sq_trace_idx = 0;
|
||||||
|
|
||||||
++ifp->if_oerrors;
|
++ifp->if_oerrors;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: bus.c,v 1.8 2001/05/26 21:27:13 chs Exp $ */
|
/* $NetBSD: bus.c,v 1.9 2001/07/08 21:04:51 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
|
@ -285,7 +285,7 @@ _bus_dmamap_create(t, size, nsegments, maxsegsz, boundary, flags, dmamp)
|
||||||
(flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL)
|
(flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL)
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
|
|
||||||
bzero(mapstore, mapsize);
|
memset(mapstore, 0, mapsize);
|
||||||
map = (struct sgimips_bus_dmamap *)mapstore;
|
map = (struct sgimips_bus_dmamap *)mapstore;
|
||||||
map->_dm_size = size;
|
map->_dm_size = size;
|
||||||
map->_dm_segcnt = nsegments;
|
map->_dm_segcnt = nsegments;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: machdep.c,v 1.19 2001/07/08 20:30:13 thorpej Exp $ */
|
/* $NetBSD: machdep.c,v 1.20 2001/07/08 21:04:52 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Soren S. Jorvang
|
* Copyright (c) 2000 Soren S. Jorvang
|
||||||
|
@ -200,7 +200,7 @@ mach_init(argc, argv, envp)
|
||||||
esym = end;
|
esym = end;
|
||||||
esym += ((Elf_Ehdr *)end)->e_entry;
|
esym += ((Elf_Ehdr *)end)->e_entry;
|
||||||
kernend = (caddr_t)mips_round_page(esym);
|
kernend = (caddr_t)mips_round_page(esym);
|
||||||
bzero(edata, end - edata);
|
memset(edata, 0, end - edata);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue