From ecf55968a100dfb9eed8ba86f2dd67abb42fb943 Mon Sep 17 00:00:00 2001 From: Tim Duesterhus Date: Wed, 15 Sep 2021 13:58:47 +0200 Subject: [PATCH] DEV: coccinelle: Add xalloc_cast.cocci This remove's C++ style casts from the return value of malloc/calloc. see 403fd722ace1d98d3cfe17bbee1382bf58040466 --- dev/coccinelle/xalloc_cast.cocci | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 dev/coccinelle/xalloc_cast.cocci diff --git a/dev/coccinelle/xalloc_cast.cocci b/dev/coccinelle/xalloc_cast.cocci new file mode 100644 index 000000000..75baa0022 --- /dev/null +++ b/dev/coccinelle/xalloc_cast.cocci @@ -0,0 +1,11 @@ +@@ +type T; +@@ + +- (T*) +( +malloc +| +calloc +) + (...)