diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2000-10-29 15:47:16 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2000-10-29 15:47:16 +0000 |
commit | 7d9d396fd545532b28c0dea8ef9f385b4fff4578 (patch) | |
tree | b0111113d7d91dcd25f09237023149e8ffd0f996 /sys/cam/cam_xpt.c | |
parent | f8eaa3d8016b5b89b5f98f3e579e75ed926fc118 (diff) | |
download | FreeBSD-src-7d9d396fd545532b28c0dea8ef9f385b4fff4578.zip FreeBSD-src-7d9d396fd545532b28c0dea8ef9f385b4fff4578.tar.gz |
Add the use of M_ZERO to some malloc calls.
Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
Approved by: gibbs
Diffstat (limited to 'sys/cam/cam_xpt.c')
-rw-r--r-- | sys/cam/cam_xpt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 4dd19c4..018ee5a 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -1349,13 +1349,12 @@ xpt_init(dummy) */ xpt_config_hook = (struct intr_config_hook *)malloc(sizeof(struct intr_config_hook), - M_TEMP, M_NOWAIT); + M_TEMP, M_NOWAIT | M_ZERO); if (xpt_config_hook == NULL) { printf("xpt_init: Cannot malloc config hook " "- failing attach\n"); return; } - bzero(xpt_config_hook, sizeof(*xpt_config_hook)); xpt_config_hook->ich_func = xpt_config; if (config_intrhook_establish(xpt_config_hook) != 0) { @@ -5406,10 +5405,10 @@ probestart(struct cam_periph *periph, union ccb *start_ccb) if ((device->quirk->quirks & CAM_QUIRK_NOSERIAL) == 0) serial_buf = (struct scsi_vpd_unit_serial_number *) - malloc(sizeof(*serial_buf), M_TEMP, M_NOWAIT); + malloc(sizeof(*serial_buf), M_TEMP, + M_NOWAIT | M_ZERO); if (serial_buf != NULL) { - bzero(serial_buf, sizeof(*serial_buf)); scsi_inquiry(csio, /*retries*/4, probedone, |