summaryrefslogtreecommitdiffstats
path: root/dev/coccinelle/xalloc_cast.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'dev/coccinelle/xalloc_cast.cocci')
-rw-r--r--dev/coccinelle/xalloc_cast.cocci11
1 files changed, 11 insertions, 0 deletions
diff --git a/dev/coccinelle/xalloc_cast.cocci b/dev/coccinelle/xalloc_cast.cocci
new file mode 100644
index 0000000..75baa00
--- /dev/null
+++ b/dev/coccinelle/xalloc_cast.cocci
@@ -0,0 +1,11 @@
+@@
+type T;
+@@
+
+- (T*)
+(
+malloc
+|
+calloc
+)
+ (...)