Files
bind9/cocci/isc_buffer_allocate_never_fail.spatch
2025-10-08 17:22:10 +02:00

39 lines
392 B
Plaintext

@deletion1@
statement S1, S2;
expression V;
@@
-V =
isc_buffer_allocate(...);
(
-if (V != ISC_R_SUCCESS) S1
|
-if (V == ISC_R_SUCCESS)
S1
-else S2
|
-check_result(V, ...);
|
-assert_int_equal(V, ISC_R_SUCCESS);
|
-CHECK(..., V);
|
-RUNTIME_CHECK(V == ISC_R_SUCCESS);
)
@deletion2@
@@
(
(
-CHECK
|
-RETERR
)
-(
isc_buffer_allocate(...)
-)
|
-DO(...,
isc_buffer_allocate(...)
-)
);