19 Dec, 2009

1 commit

  • 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
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Julia Lawall
     

14 Jul, 2008

1 commit