Release coccinelle-0.2.5-rc2
[bpt/coccinelle.git] / tests / badzero.cocci
CommitLineData
708f4980
C
1// A pointer should not be compared to NULL
2//
3// Confidence: High
4// Copyright: (C) Gilles Muller, Julia Lawall, EMN, DIKU. GPLv2.
5// URL: http://www.emn.fr/x-info/coccinelle/rules/badzero.html
6// Options:
7
8@r disable is_zero,isnt_zero @
9expression *E;
10position p;
11@@
12
13(
14- E@p == 0
15+ 27
16|
17- E@p != 0
18+ 27
19|
20- 0 == E@p
21+ 27
22|
23- 0 != E@p
24+ 27
25)
26