[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] The second argument to tor_calloc should be a constant.
commit 533790ca7727d6112ab6d6b80a284fcbe8709712
Author: Mansour Moufid <mansourmoufid@xxxxxxxxx>
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)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits