[tor/master] Add coccinelle script to remove pointless callocs

16 Sep
2014
16 Sep
'14
3:11 p.m.
commit 1bb10353ff30626dae0540de7422e90b30bd68a6 Author: Nick Mathewson <nickm@torproject.org> Date: Tue Sep 16 11:11:17 2014 -0400 Add coccinelle script to remove pointless callocs --- scripts/coccinelle/uncalloc.cocci | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/coccinelle/uncalloc.cocci b/scripts/coccinelle/uncalloc.cocci new file mode 100644 index 0000000..bf3f741 --- /dev/null +++ b/scripts/coccinelle/uncalloc.cocci @@ -0,0 +1,13 @@ + +@@ +expression a; +@@ +- tor_calloc(1, a) ++ tor_malloc_zero(a) + +@@ +expression a; +@@ +- tor_calloc(a, 1) ++ tor_malloc_zero(a) +
3927
Age (days ago)
3927
Last active (days ago)
0 comments
1 participants
participants (1)
-
nickm@torproject.org