diff options
Diffstat (limited to 'cocci/isc_mempool_create_cannot_fail.cocci')
-rw-r--r-- | cocci/isc_mempool_create_cannot_fail.cocci | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/cocci/isc_mempool_create_cannot_fail.cocci b/cocci/isc_mempool_create_cannot_fail.cocci new file mode 100644 index 0000000..f3509d2 --- /dev/null +++ b/cocci/isc_mempool_create_cannot_fail.cocci @@ -0,0 +1,49 @@ +@@ +expression V; +@@ + +- V = + isc_mempool_create(...); +- assert_int_equal(V, ISC_R_SUCCESS); + +@@ +expression V; +@@ + +- V = + isc_mempool_create(...); +- check_result(V, ...); + +@@ +@@ + +- CHECK( + isc_mempool_create(...) +- ) + ; + +@@ +@@ + +- RUNTIME_CHECK( + isc_mempool_create(...) +- == ISC_R_SUCCESS) + ; + +@@ +expression V; +statement S; +@@ + +- V = + isc_mempool_create(...); +- if (V != ISC_R_SUCCESS) S + +@@ +statement S; +@@ + +- if ( + isc_mempool_create(...) +- != ISC_R_SUCCESS) S ++ ; |