This website works better with JavaScript
Home
Explore
Help
Sign In
piros
/
tor
Watch
3
Star
0
Fork
0
Files
Issues
0
Pull Requests
0
Wiki
Browse Source
Add coccinelle script to remove pointless callocs
Nick Mathewson
10 years ago
parent
ef9a0d2048
commit
1bb10353ff
1 changed files
with
13 additions
and
0 deletions
Split View
Show Diff Stats
13
0
scripts/coccinelle/uncalloc.cocci
+ 13
- 0
scripts/coccinelle/uncalloc.cocci
View File
@@ -0,0 +1,13 @@
+
+@@
+expression a;
+@@
+- tor_calloc(1, a)
++ tor_malloc_zero(a)
+
+@@
+expression a;
+@@
+- tor_calloc(a, 1)
++ tor_malloc_zero(a)
+