Skip to content

Commit

Permalink
Coccinelle: kzalloc-simple: Add all zero allocating functions
Browse files Browse the repository at this point in the history
There are many instances where memory is allocated using regular
allocator functions immediately followed by setting the allocated
memory to 0 value using memset.

We already have zero memory allocator functions to set the memory to
0 value instead of manually setting it using memset.

Therefore, use zero memory allocating functions instead of regular
memory allocators followed by memset 0 to remove redundant memset and
make the code more cleaner and also reduce the code size.

Signed-off-by: Himanshu Jha <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
himanshujha199640 authored and masahir0y committed Jan 16, 2018
1 parent 262dad6 commit 5e2d9da
Showing 1 changed file with 367 additions and 5 deletions.
Loading

0 comments on commit 5e2d9da

Please sign in to comment.