From 5b535de47447d56cf02668ccb2609b4f03c9378f 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 000000000..04893d97f --- /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)