From: Tim Duesterhus Date: Wed, 15 Sep 2021 11:58:47 +0000 (+0200) Subject: DEV: coccinelle: Add xalloc_cast.cocci X-Git-Tag: v2.5-dev8~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecf55968a100dfb9eed8ba86f2dd67abb42fb943;p=thirdparty%2Fhaproxy.git DEV: coccinelle: Add xalloc_cast.cocci This remove's C++ style casts from the return value of malloc/calloc. see 403fd722ace1d98d3cfe17bbee1382bf58040466 --- diff --git a/dev/coccinelle/xalloc_cast.cocci b/dev/coccinelle/xalloc_cast.cocci new file mode 100644 index 0000000000..75baa0022c --- /dev/null +++ b/dev/coccinelle/xalloc_cast.cocci @@ -0,0 +1,11 @@ +@@ +type T; +@@ + +- (T*) +( +malloc +| +calloc +) + (...)