From fd9afb29d3c5969179319af171f8d6181f10eeb0 Mon Sep 17 00:00:00 2001 From: Mansour Moufid Date: Sun, 15 Feb 2015 17:34:22 -0500 Subject: [PATCH] Add a semantic patch to remove casts of malloc. --- scripts/rm-malloc-cast.cocci | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 scripts/rm-malloc-cast.cocci diff --git a/scripts/rm-malloc-cast.cocci b/scripts/rm-malloc-cast.cocci new file mode 100644 index 0000000000..04893d97f7 --- /dev/null +++ b/scripts/rm-malloc-cast.cocci @@ -0,0 +1,7 @@ +@rm_malloc_cast@ +expression x, n; +type T; +@@ + x = +- (T *) + polarssl_malloc(n)