commit 9e1fa959201611b764ac90ce59485d33b8ea975b parent 7666cd88817422da17f6ef725122ce0b230c1d24 Author: Alexander Færøy <ahf@torproject.org> Date: Mon, 5 Jun 2017 15:54:21 +0000 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(). Diffstat:
| A | scripts/coccinelle/test_assert_null.cocci | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/scripts/coccinelle/test_assert_null.cocci b/scripts/coccinelle/test_assert_null.cocci @@ -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) +)