summaryrefslogtreecommitdiff
path: root/coccinelle/equals-null.cocci
blob: 92c70540130135686a8a3c40001c84f56ed48561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
expression e;
statement s;
@@
if (
(
!e
|
- e == NULL
+ !e
)
   )
   {...}
else s

@@
expression e;
statement s;
@@
if (
(
e
|
- e != NULL
+ e
)
   )
   {...}
else s