isc_event_allocate() can't fail now, add spatch to remove the checks
This commit is contained in:
committed by
Mark Andrews
parent
767de9fe30
commit
2d12def6ee
33
cocci/isc_event_allocat_never_fail.spatch
Normal file
33
cocci/isc_event_allocat_never_fail.spatch
Normal file
@@ -0,0 +1,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
|
||||
Reference in New Issue
Block a user