HCoop
/
bpt
/
coccinelle.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Release coccinelle-0.1.8
[bpt/coccinelle.git]
/
tests
/
badzero.cocci
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 @
9
expression *E;
10
position 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