aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2009-12-09 20:25:04 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-23 11:27:48 -0800
commit4068fe8b2aa3e12643db0ad5dd4bcf6755a7320f (patch)
tree2d31d9b263851df83bb5733e3ee0f453d7755da5 /drivers/staging
parent488d3749620779ab2668c0dba2962836e51e3cd6 (diff)
downloadkernel_samsung_aries-4068fe8b2aa3e12643db0ad5dd4bcf6755a7320f.zip
kernel_samsung_aries-4068fe8b2aa3e12643db0ad5dd4bcf6755a7320f.tar.gz
kernel_samsung_aries-4068fe8b2aa3e12643db0ad5dd4bcf6755a7320f.tar.bz2
Staging: wlan-ng: fix Correct size given to memset
Memset should be given the size of the structure, not the size of the pointer. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; T *x; expression E; @@ memset(x, E, sizeof( + * x)) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/wlan-ng/prism2fw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c
index 7d76a7f..aaa70ed 100644
--- a/drivers/staging/wlan-ng/prism2fw.c
+++ b/drivers/staging/wlan-ng/prism2fw.c
@@ -439,7 +439,7 @@ void free_chunks(imgchunk_t *fchunk, unsigned int *nfchunks)
}
}
*nfchunks = 0;
- memset(fchunk, 0, sizeof(fchunk));
+ memset(fchunk, 0, sizeof(*fchunk));
}