mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-21 14:17:27 -04:00
isc_event_allocate() can't fail now, add spatch to remove the checks
This commit is contained in:
parent
767de9fe30
commit
2d12def6ee
1 changed files with 33 additions and 0 deletions
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
|
||||
Loading…
Reference in a new issue