diff options
author | 2007-09-16 15:54:52 +0000 | |
---|---|---|
committer | 2007-09-16 15:54:52 +0000 | |
commit | 3764302df6ec49f35d27e25f98baaeebbf1396b5 (patch) | |
tree | 74ab32e63690c1d839ac29219416e037a5d7068f | |
parent | finish reindenting str.c (diff) | |
download | wireguard-openbsd-3764302df6ec49f35d27e25f98baaeebbf1396b5.tar.xz wireguard-openbsd-3764302df6ec49f35d27e25f98baaeebbf1396b5.zip |
A couple of obvious bzero() -> M_ZERO changes I missed.
-rw-r--r-- | sys/scsi/scsiconf.c | 5 | ||||
-rw-r--r-- | sys/scsi/st.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 342899737aa..a32a29ec168 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.125 2007/05/08 18:50:39 deraadt Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.126 2007/09/16 15:54:52 krw Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -168,10 +168,9 @@ scsibusattach(struct device *parent, struct device *self, void *aux) panic("scsibusattach: can't allocate target links"); nbytes = sb->adapter_link->luns * sizeof(struct scsi_link *); for (i = 0; i < sb->sc_buswidth; i++) { - sb->sc_link[i] = malloc(nbytes, M_DEVBUF, M_NOWAIT); + sb->sc_link[i] = malloc(nbytes, M_DEVBUF, M_NOWAIT | M_ZERO); if (sb->sc_link[i] == NULL) panic("scsibusattach: can't allocate lun links"); - bzero(sb->sc_link[i], nbytes); } #if NBIO > 0 diff --git a/sys/scsi/st.c b/sys/scsi/st.c index f22849567a1..c64f4623cbe 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.75 2007/06/06 17:15:14 deraadt Exp $ */ +/* $OpenBSD: st.c,v 1.76 2007/09/16 15:54:52 krw Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -1400,7 +1400,7 @@ st_mode_select(st, flags) inbuf = malloc(sizeof(*inbuf), M_TEMP, M_NOWAIT); if (inbuf == NULL) return (ENOMEM); - outbuf = malloc(sizeof(*outbuf), M_TEMP, M_NOWAIT); + outbuf = malloc(sizeof(*outbuf), M_TEMP, M_NOWAIT | M_ZERO); if (outbuf == NULL) { free(inbuf, M_TEMP); return (ENOMEM); @@ -1426,7 +1426,6 @@ st_mode_select(st, flags) return (0); } - bzero(outbuf, sizeof(*outbuf)); bzero(&general, sizeof(general)); general.density = st->density; |