Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Don't use sizeof on a pointer when you mean the w...



details:   https://anonhg.NetBSD.org/src/rev/4204812e5181
branches:  trunk
changeset: 570330:4204812e5181
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Mon Oct 04 11:23:39 2004 +0000

description:
Don't use sizeof on a pointer when you mean the whole structure.

diffstat:

 sys/dev/ic/aic79xx_osm.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 8325efaefa29 -r 4204812e5181 sys/dev/ic/aic79xx_osm.c
--- a/sys/dev/ic/aic79xx_osm.c  Mon Oct 04 11:12:09 2004 +0000
+++ b/sys/dev/ic/aic79xx_osm.c  Mon Oct 04 11:23:39 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aic79xx_osm.c,v 1.9 2004/10/04 11:08:47 fvdl Exp $     */
+/*     $NetBSD: aic79xx_osm.c,v 1.10 2004/10/04 11:23:39 fvdl Exp $    */
 
 /*
  * Bus independent NetBSD shim for the aic7xxx based adaptec SCSI controllers
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aic79xx_osm.c,v 1.9 2004/10/04 11:08:47 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic79xx_osm.c,v 1.10 2004/10/04 11:23:39 fvdl Exp $");
 
 #include <dev/ic/aic79xx_osm.h>
 #include <dev/ic/aic7xxx_cam.h>
@@ -241,7 +241,7 @@
                 */
                siu = (struct scsi_status_iu_header *)scb->sense_data;
                sense_len = MIN(scsi_4btoul(siu->sense_length),
-                               sizeof(&xs->sense.scsi_sense));
+                               sizeof(xs->sense.scsi_sense));
                memset(&xs->sense.scsi_sense, 0, sizeof(xs->sense.scsi_sense));
                memcpy(&xs->sense.scsi_sense, 
                       scb->sense_data + SIU_SENSE_OFFSET(siu), sense_len);



Home | Main Index | Thread Index | Old Index