From 8e75bfcf9980c7d72c556f60dd09ff7914317ec3 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 11 Oct 2002 09:59:22 +0000 Subject: Use malloc(9)'s M_ZERO rather than explicit bzero(9) call. --- sys/cam/scsi/scsi_da.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/cam') 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); -- cgit v1.1