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:
Alexander Færøy 2017-06-05 15:54:21 +00:00 committed by Nick Mathewson
parent 7666cd8881
commit 9e1fa95920
1 changed files with 11 additions and 0 deletions

View 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)
)