Explorar o código

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().
Alexander Færøy %!s(int64=7) %!d(string=hai) anos
pai
achega
9e1fa95920
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      scripts/coccinelle/test_assert_null.cocci

+ 11 - 0
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)
+)