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/dns_message_create.spatch | |
parent | Initial commit. (diff) | |
download | bind9-45d6379135504814ab723b57f0eb8be23393a51d.tar.xz bind9-45d6379135504814ab723b57f0eb8be23393a51d.zip |
Adding upstream version 1:9.16.44.upstream/1%9.16.44
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cocci/dns_message_create.spatch')
-rw-r--r-- | cocci/dns_message_create.spatch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/cocci/dns_message_create.spatch b/cocci/dns_message_create.spatch new file mode 100644 index 0000000..bab6d58 --- /dev/null +++ b/cocci/dns_message_create.spatch @@ -0,0 +1,84 @@ +@@ +statement S; +expression V; +@@ + +- V = + dns_message_create(...); +- if (V != ISC_R_SUCCESS) S + +@@ +statement S1, S2; +expression V; +@@ + +- V = + dns_message_create(...); +- if (V == ISC_R_SUCCESS) + S1 +- else S2 + +@@ +expression V; +@@ + +- V = + dns_message_create(...); +- check_result(V, ...); + +@@ +@@ + +- CHECK( + dns_message_create(...) +- ) + ; + +@@ +@@ + +- DO(..., + dns_message_create(...) +- ) + ; + +@@ +@@ + +- RETERR( + dns_message_create(...) +- ) + ; + +@@ +expression V; +@@ + +- V = + dns_message_create(...); +- assert_int_equal(V, ISC_R_SUCCESS); + +@@ +expression V; +@@ + +- V = + dns_message_create(...); +- CHECK(..., V); + +@@ +expression V; +statement S; +@@ + +- V = + dns_message_create(...); +- if (ISC_UNLIKELY(V != ISC_R_SUCCESS)) S + +@@ +expression V; +@@ + +- V = + dns_message_create(...); +- RUNTIME_CHECK(V == ISC_R_SUCCESS); |