Use malloc(9)'s M_ZERO rather than explicit bzero(9) call.

This commit is contained in:
Poul-Henning Kamp 2002-10-11 09:59:22 +00:00
parent 20109e1f9a
commit 87d59d4d4b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104877

View File

@ -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);