Date: Mon, 2 Jul 2012 19:19:21 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r238014 - in stable/8/sys: dev/mfi dev/mps dev/mpt kern Message-ID: <201207021919.q62JJLAb089265@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Mon Jul 2 19:19:21 2012 New Revision: 238014 URL: http://svn.freebsd.org/changeset/base/238014 Log: MFC: r237546 Correct sizeof usage Obtained from: DragonFly Modified: stable/8/sys/dev/mfi/mfi_tbolt.c stable/8/sys/dev/mps/mps_sas.c stable/8/sys/dev/mpt/mpt_cam.c stable/8/sys/kern/subr_firmware.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/dev/mfi/mfi_tbolt.c ============================================================================== --- stable/8/sys/dev/mfi/mfi_tbolt.c Mon Jul 2 19:19:07 2012 (r238013) +++ stable/8/sys/dev/mfi/mfi_tbolt.c Mon Jul 2 19:19:21 2012 (r238014) @@ -1078,7 +1078,7 @@ mfi_tbolt_build_mpt_cmd(struct mfi_softc if (!req_desc) return NULL; - bzero(req_desc, sizeof(req_desc)); + bzero(req_desc, sizeof(*req_desc)); req_desc->header.RequestFlags = (MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO << MFI_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); req_desc->header.SMID = index; Modified: stable/8/sys/dev/mps/mps_sas.c ============================================================================== --- stable/8/sys/dev/mps/mps_sas.c Mon Jul 2 19:19:07 2012 (r238013) +++ stable/8/sys/dev/mps/mps_sas.c Mon Jul 2 19:19:21 2012 (r238014) @@ -2217,7 +2217,7 @@ mpssas_scsiio_complete(struct mps_softc sense_len = min(returned_sense_len, ccb->csio.sense_len - ccb->csio.sense_resid); bzero(&ccb->csio.sense_data, - sizeof(&ccb->csio.sense_data)); + sizeof(ccb->csio.sense_data)); bcopy(cm->cm_sense, &ccb->csio.sense_data, sense_len); ccb->ccb_h.status |= CAM_AUTOSNS_VALID; } Modified: stable/8/sys/dev/mpt/mpt_cam.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_cam.c Mon Jul 2 19:19:07 2012 (r238013) +++ stable/8/sys/dev/mpt/mpt_cam.c Mon Jul 2 19:19:21 2012 (r238014) @@ -3179,7 +3179,7 @@ mpt_scsi_reply_frame_handler(struct mpt_ ccb->ccb_h.status |= CAM_AUTOSNS_VALID; ccb->csio.sense_resid = ccb->csio.sense_len - le32toh(scsi_io_reply->SenseCount); - bzero(&ccb->csio.sense_data, sizeof(&ccb->csio.sense_data)); + bzero(&ccb->csio.sense_data, sizeof(ccb->csio.sense_data)); bcopy(req->sense_vbuf, &ccb->csio.sense_data, min(ccb->csio.sense_len, le32toh(scsi_io_reply->SenseCount))); Modified: stable/8/sys/kern/subr_firmware.c ============================================================================== --- stable/8/sys/kern/subr_firmware.c Mon Jul 2 19:19:07 2012 (r238013) +++ stable/8/sys/kern/subr_firmware.c Mon Jul 2 19:19:21 2012 (r238014) @@ -193,7 +193,7 @@ firmware_register(const char *imagename, __func__, imagename); return NULL; } - bzero(frp, sizeof(frp)); /* start from a clean record */ + bzero(frp, sizeof(*frp)); /* start from a clean record */ frp->fw.name = imagename; frp->fw.data = data; frp->fw.datasize = datasize;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207021919.q62JJLAb089265>