summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-10-11 09:59:22 +0000
committerphk <phk@FreeBSD.org>2002-10-11 09:59:22 +0000
commit8e75bfcf9980c7d72c556f60dd09ff7914317ec3 (patch)
tree03d3c227c2e18b90684a8b3faa420be5ab02f663 /sys/cam
parentdb9d87808bd5c543f68333281fecfb4eb0453fdf (diff)
downloadFreeBSD-src-8e75bfcf9980c7d72c556f60dd09ff7914317ec3.zip
FreeBSD-src-8e75bfcf9980c7d72c556f60dd09ff7914317ec3.tar.gz
Use malloc(9)'s M_ZERO rather than explicit bzero(9) call.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_da.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 59c1061..69107e6 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -1059,7 +1059,8 @@ daregister(struct cam_periph *periph, void *arg)
return(CAM_REQ_CMP_ERR);
}
- softc = (struct da_softc *)malloc(sizeof(*softc),M_DEVBUF,M_NOWAIT);
+ softc = (struct da_softc *)malloc(sizeof(*softc), M_DEVBUF,
+ M_NOWAIT|M_ZERO);
if (softc == NULL) {
printf("daregister: Unable to probe new device. "
@@ -1067,7 +1068,6 @@ daregister(struct cam_periph *periph, void *arg)
return(CAM_REQ_CMP_ERR);
}
- bzero(softc, sizeof(*softc));
LIST_INIT(&softc->pending_ccbs);
softc->state = DA_STATE_PROBE;
bioq_init(&softc->bio_queue);
OpenPOWER on IntegriCloud