]> git.baikalelectronics.ru Git - kernel.git/commit
rtc-at91sam9: Correct size given to memset
authorJulia Lawall <julia@diku.dk>
Fri, 5 Mar 2010 21:44:23 +0000 (13:44 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Mar 2010 19:26:47 +0000 (11:26 -0800)
commitf1fa0120bd603271e6ba1ed797a8d874e7e55777
tree6cec2579973aad15acfad14f48733585be7a85f2
parent95faa786d3b8ddbfac2ee6f841a0682fb3754def
rtc-at91sam9: 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: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-at91sam9.c