diff options
author | Laurent Vivier | 2016-06-15 18:14:31 +0200 |
---|---|---|
committer | Michael Tokarev | 2016-09-15 14:32:22 +0200 |
commit | ac4e29f100355bd2c5d93376ed9ae5b4b7e98bad (patch) | |
tree | 30dc758b5a1f43248a020ab53d388b0cbc9398b9 | |
parent | curl: Operate on zero-length file (diff) | |
download | qemu-ac4e29f100355bd2c5d93376ed9ae5b4b7e98bad.tar.gz qemu-ac4e29f100355bd2c5d93376ed9ae5b4b7e98bad.tar.xz 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>
-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 |