diff options
author | Laurent Vivier <lvivier@redhat.com> | 2016-06-15 18:14:31 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2016-09-15 15:32:22 +0300 |
commit | ac4e29f100355bd2c5d93376ed9ae5b4b7e98bad (patch) | |
tree | 30dc758b5a1f43248a020ab53d388b0cbc9398b9 /scripts/coccinelle | |
parent | a41c457881b5463b18901a849b4289459ab1d231 (diff) | |
download | qemu-ac4e29f100355bd2c5d93376ed9ae5b4b7e98bad.zip |
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>
Diffstat (limited to 'scripts/coccinelle')
-rw-r--r-- | scripts/coccinelle/typecast.cocci | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/coccinelle/typecast.cocci b/scripts/coccinelle/typecast.cocci new file mode 100644 index 0000000000..be2183ee4f --- /dev/null +++ b/scripts/coccinelle/typecast.cocci @@ -0,0 +1,7 @@ +// Remove useless casts +@@ +type T; +T v; +@@ +- (T *)&v ++ &v |