Use malloc(9)'s M_ZERO rather than explicit bzero(9) call.
This commit is contained in:
parent
20109e1f9a
commit
87d59d4d4b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user