Explorar el Código

The second argument to tor_calloc should be a constant.

Just like the conventional calloc.
Mansour Moufid hace 9 años
padre
commit
533790ca77
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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)