coccinelle: add a script to remove useless casts
Script from LKML. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
a41c457881
commit
ac4e29f100
7
scripts/coccinelle/typecast.cocci
Normal file
7
scripts/coccinelle/typecast.cocci
Normal file
@ -0,0 +1,7 @@
|
||||
// Remove useless casts
|
||||
@@
|
||||
type T;
|
||||
T v;
|
||||
@@
|
||||
- (T *)&v
|
||||
+ &v
|
Loading…
Reference in New Issue
Block a user