HCoop
/
bpt
/
coccinelle.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
permit multiline comments and strings in macros
[bpt/coccinelle.git]
/
demos
/
janitorings
/
bad_zero.cocci
1
2
@ disable is_zero @
3
expression *E;
4
@@
5
6
E ==
7
- 0
8
+ NULL
9
10
@ disable is_zero @
11
expression *E;
12
@@
13
14
- 0
15
+ NULL
16
== E
17
18
@ disable isnt_zero @
19
expression *E;
20
@@
21
22
E !=
23
- 0
24
+ NULL
25
26
@ disable isnt_zero @
27
expression *E;
28
@@
29
30
- 0
31
+ NULL
32
!= E
33
34
35
@@
36
idexpression *X;
37
statement S;
38
@@
39
40
- if(X == NULL)
41
+ if(!X)
42
S
43
44
@@
45
idexpression *X;
46
statement S;
47
@@
48
49
- if(X != NULL)
50
+ if(X)
51
S