[tor-commits] [tor/master] The second argument to tor_calloc should be a constant.
nickm at torproject.org
nickm at torproject.org
Sun Nov 2 17:09:19 UTC 2014
commit 533790ca7727d6112ab6d6b80a284fcbe8709712
Author: Mansour Moufid <mansourmoufid at gmail.com>
Date: Sun Oct 19 12:20:36 2014 -0400
The second argument to tor_calloc should be a constant.
Just like the conventional calloc.
---
scripts/coccinelle/calloc.cocci | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/coccinelle/calloc.cocci b/scripts/coccinelle/calloc.cocci
index f7d7ec0..df0b61d 100644
--- a/scripts/coccinelle/calloc.cocci
+++ b/scripts/coccinelle/calloc.cocci
@@ -2,7 +2,8 @@
@malloc_to_calloc@
identifier f =~ "(tor_malloc|tor_malloc_zero)";
-expression a, b;
+expression a;
+constant b;
@@
- f(a * b)
+ tor_calloc(a, b)
More information about the tor-commits
mailing list