On Wed, Dec 09, 2009 at 08:23:09PM +0100, Julia Lawall wrote:
> From: Julia Lawall
>
> 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/)
>
> //
> @@
> type T;
> T *x;
> expr
From: Julia Lawall
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/)
//
@@
type T;
T *x;
expression E;
@@
memset(x, E, sizeof(
+ *
x))
//
Signed-off-by: Julia Lawall
---
cr