25 May, 2011

1 commit

  • This has no actual effect, since sizeof(struct hlist_head) ==
    sizeof(struct hlist_head *), but it's still the wrong type to use.

    The semantic match that finds this problem:
    //
    @@
    type T;
    identifier x;
    @@
    T *x;
    ...
    * x = kzalloc(... * sizeof(T*) * ..., ...);
    //

    [akpm@linux-foundation.org: use kcalloc()]
    Signed-off-by: Ilia Mirkin
    Acked-by: Lars Ellenberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ilia Mirkin
     

02 Oct, 2009

1 commit