diff options
author | Joe Perches <joe@perches.com> | 2011-05-09 08:32:40 +0200 |
---|---|---|
committer | James Bottomley <jbottomley@parallels.com> | 2011-05-17 09:19:27 +0200 |
commit | 7630abd0c690e90cea9412846f596fe1565aaa0e (patch) | |
tree | 395c8bac6bc936ffb57192ec47a02e16f522d4c7 /drivers/scsi/hpsa.c | |
parent | [SCSI] ipr: Rate limit DMA mapping errors (diff) | |
download | linux-7630abd0c690e90cea9412846f596fe1565aaa0e.tar.xz linux-7630abd0c690e90cea9412846f596fe1565aaa0e.zip |
[SCSI] hpsa: Change memset using sizeof(ptr) to sizeof(*ptr)
Not at all sure this is correct or appropriate to change,
but this seems odd.
Found via coccinelle script
@@
type T;
T* ptr;
expression E1;
@@
* memset(E1, 0, sizeof(ptr));
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to '')
-rw-r--r-- | drivers/scsi/hpsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index cffc7bb419de..c6c0434d8034 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -1329,7 +1329,7 @@ static void hpsa_scsi_do_simple_cmd_with_retry(struct ctlr_info *h, int retry_count = 0; do { - memset(c->err_info, 0, sizeof(c->err_info)); + memset(c->err_info, 0, sizeof(*c->err_info)); hpsa_scsi_do_simple_cmd_core(h, c); retry_count++; } while (check_for_unit_attention(h, c) && retry_count <= 3); |