浏览代码

The second argument to tor_calloc should be a constant.

Just like the conventional calloc.
Mansour Moufid 9 年之前
父节点
当前提交
533790ca77
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      scripts/coccinelle/calloc.cocci

+ 2 - 1
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)