mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
a746081f38
This does not change its effects.
16 lines
301 B
Plaintext
16 lines
301 B
Plaintext
// Use calloc or realloc as appropriate instead of multiply-and-alloc
|
|
|
|
@malloc_to_calloc@
|
|
identifier f =~ "(tor_malloc|tor_malloc_zero)";
|
|
expression a, b;
|
|
@@
|
|
- f(a * b)
|
|
+ tor_calloc(a, b)
|
|
|
|
@realloc_to_reallocarray@
|
|
expression a, b;
|
|
expression p;
|
|
@@
|
|
- tor_realloc(p, a * b)
|
|
+ tor_reallocarray(p, a, b)
|