diff options
author | Mansour Moufid <mansourmoufid@gmail.com> | 2014-10-19 12:20:36 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-11-02 11:54:42 -0500 |
commit | 533790ca7727d6112ab6d6b80a284fcbe8709712 (patch) | |
tree | 010a29a7f19b68fbc5a12804f67fa772e2873988 /scripts/coccinelle | |
parent | a746081f385e20422a314f57ac21ad95b7fd0b09 (diff) | |
download | tor-533790ca7727d6112ab6d6b80a284fcbe8709712.tar.gz tor-533790ca7727d6112ab6d6b80a284fcbe8709712.zip |
The second argument to tor_calloc should be a constant.
Just like the conventional calloc.
Diffstat (limited to 'scripts/coccinelle')
-rw-r--r-- | scripts/coccinelle/calloc.cocci | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/coccinelle/calloc.cocci b/scripts/coccinelle/calloc.cocci index f7d7ec0dc3..df0b61de06 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) |