summaryrefslogtreecommitdiffstats
path: root/cocci/isc_event_allocat_never_fail.spatch
blob: eab22659f50fb608979fc01f9c8193d5df69a83c (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
31
32
33
@@
statement S;
expression V;
@@

V = isc_event_allocate(...);
- if (V == NULL) S

@@
type T;
statement S;
expression V;
@@

V = (T *)isc_event_allocate(...);
- if (V == NULL) S

@@
statement S;
expression V;
@@

if (V == NULL) V = isc_event_allocate(...);
- if (V == NULL) S

@@
statement S1, S2;
expression V;
@@

V = isc_event_allocate(...);
- if (V == NULL) S1 else { S2 }
+ S2