diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 07:24:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 07:24:22 +0000 |
commit | 45d6379135504814ab723b57f0eb8be23393a51d (patch) | |
tree | d4f2ec4acca824a8446387a758b0ce4238a4dffa /cocci/isc_mempool_create_cannot_fail.cocci | |
parent | Initial commit. (diff) | |
download | bind9-45d6379135504814ab723b57f0eb8be23393a51d.tar.xz bind9-45d6379135504814ab723b57f0eb8be23393a51d.zip |
Adding upstream version 1:9.16.44.upstream/1%9.16.44upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 ++ ; |