From 45d6379135504814ab723b57f0eb8be23393a51d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 09:24:22 +0200 Subject: Adding upstream version 1:9.16.44. Signed-off-by: Daniel Baumann --- cocci/dns_message_create.spatch | 84 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 cocci/dns_message_create.spatch (limited to 'cocci/dns_message_create.spatch') 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); -- cgit v1.2.3