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_name_copy-with-result.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 '')
-rw-r--r-- | cocci/dns_name_copy-with-result.spatch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cocci/dns_name_copy-with-result.spatch b/cocci/dns_name_copy-with-result.spatch new file mode 100644 index 0000000..c4555c3 --- /dev/null +++ b/cocci/dns_name_copy-with-result.spatch @@ -0,0 +1,30 @@ +@@ +expression V, E1, E2; +statement S; +@@ + +- V = dns_name_copy(E1, E2, NULL); +- if (V != ISC_R_SUCCESS) S ++ RUNTIME_CHECK(dns_name_copy(E1, E2, NULL) == ISC_R_SUCCESS); + +@@ +expression V, E1, E2; +statement S1, S2; +@@ + +- V = dns_name_copy(E1, E2, NULL); +- if (V == ISC_R_SUCCESS) S1 else S2; ++ RUNTIME_CHECK(dns_name_copy(E1, E2, NULL) == ISC_R_SUCCESS); ++ S2 + +@@ +expression V, E1, E2; +statement S1, S2; +@@ + +- V = dns_name_copy(E1, E2, NULL); +- S1 +- if (V == ISC_R_SUCCESS) S2 ++ RUNTIME_CHECK(dns_name_copy(E1, E2, NULL) == ISC_R_SUCCESS); ++ S1 ++ S2 |