Alexander Færøy
9e1fa95920
Add Coccinelle patch for replacing NULL/non-NULL tt_assert().
...
This patch replaces tt_assert() checks for NULL/non-NULL values with
tt_ptr_op().
2017-08-24 15:22:20 -04:00
Alexander Færøy
7666cd8881
Add Coccinelle patch for replacing tt_assert() usage on integer types.
...
This patch replaces tt_assert() comparison of integers and unsigned
integers with their respective tt_int_op or tt_uint_op counterpart.
2017-08-24 15:21:43 -04:00
Alexander Færøy
3fd68b249b
Add Coccinelle patch for replacing tt_assert(0) with tt_abort().
2017-08-24 15:21:07 -04:00
Alexander Færøy
25eaf77033
Add Coccinelle patch for detecing places where CEIL_DIV should be used.
2017-08-24 15:20:11 -04:00
Alexander Færøy
7c3e980fb9
Add script for cleaning op operator usage in test files.
...
This patch adds a script written by Nick for bug #13172 to clean up the
usage of ==, !=, <, >, <=, and >= by replacing them with their symbolic
OP_* counterpart. This will ensure that a tool like Coccinelle doesn't
get confused and silently ignore large blocks of code.
2017-08-24 15:19:11 -04:00
Mansour Moufid
3ab2c865bf
Add a rule to the calloc semantic patch for argument ordering.
2014-11-02 11:54:42 -05:00
Mansour Moufid
533790ca77
The second argument to tor_calloc should be a constant.
...
Just like the conventional calloc.
2014-11-02 11:54:42 -05:00
Mansour Moufid
a746081f38
Refactor the calloc semantic patch.
...
This does not change its effects.
2014-11-02 11:54:42 -05:00
Nick Mathewson
1bb10353ff
Add coccinelle script to remove pointless callocs
2014-09-16 11:11:17 -04:00
Nick Mathewson
ef9a0d2048
Add script to detect and remove unCish malloc-then-cast pattern
...
Also, apply it.
2014-09-16 10:57:00 -04:00
Nick Mathewson
5da821a8a3
Add a simple coccinelle script to replace malloc->calloc
...
Coccinelle is a semantic patching tool that can automatically change
C code via semantic patching.
This script also replaces realloc with reallocarray as appropriate.
2014-08-13 10:39:56 -04:00