diff --git a/coccinelle/equals-null.cocci b/coccinelle/equals-null.cocci index 957d828a83..3fce0f4caa 100644 --- a/coccinelle/equals-null.cocci +++ b/coccinelle/equals-null.cocci @@ -2,13 +2,28 @@ expression e; statement s; @@ -- if (e == NULL) -+ if (!e) -s +if ( +( +!e +| +- e == NULL ++ !e +) + ) + {...} +else s + @@ expression e; statement s; @@ -- if (e != NULL) -+ if (e) -s +if ( +( +e +| +- e != NULL ++ e +) + ) + {...} +else s