mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
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().
This commit is contained in:
parent
7666cd8881
commit
9e1fa95920
11
scripts/coccinelle/test_assert_null.cocci
Normal file
11
scripts/coccinelle/test_assert_null.cocci
Normal file
@ -0,0 +1,11 @@
|
||||
@@
|
||||
expression * e;
|
||||
@@
|
||||
|
||||
(
|
||||
- tt_assert(e != NULL)
|
||||
+ tt_ptr_op(e, OP_NE, NULL)
|
||||
|
|
||||
- tt_assert(e == NULL)
|
||||
+ tt_ptr_op(e, OP_EQ, NULL)
|
||||
)
|
Loading…
Reference in New Issue
Block a user