diff options
Diffstat (limited to 'coccinelle/equals-null.cocci')
-rw-r--r-- | coccinelle/equals-null.cocci | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/coccinelle/equals-null.cocci b/coccinelle/equals-null.cocci new file mode 100644 index 0000000..3fce0f4 --- /dev/null +++ b/coccinelle/equals-null.cocci @@ -0,0 +1,29 @@ +@@ +expression e; +statement s; +@@ +if ( +( +!e +| +- e == NULL ++ !e +) + ) + {...} +else s + +@@ +expression e; +statement s; +@@ +if ( +( +e +| +- e != NULL ++ e +) + ) + {...} +else s |