From f3f1cab05e05c9bdd5da91f3ab159ec6658ec7f4 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Fri, 21 May 2021 17:59:09 -0700 Subject: [PATCH] clean up coccinelle patches for dns_name_copy() no need for semantic patches to use dns_name_copynf() any longer. --- cocci/dns_name_copy-with-result.spatch | 6 +++--- cocci/dns_name_copy.spatch | 8 ++++---- cocci/dns_name_copynf.spatch | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cocci/dns_name_copy-with-result.spatch b/cocci/dns_name_copy-with-result.spatch index c4555c3a76..129d421d67 100644 --- a/cocci/dns_name_copy-with-result.spatch +++ b/cocci/dns_name_copy-with-result.spatch @@ -5,7 +5,7 @@ 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); ++ dns_name_copy(E1, E2); @@ expression V, E1, E2; @@ -14,7 +14,7 @@ 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); ++ dns_name_copy(E1, E2); + S2 @@ @@ -25,6 +25,6 @@ 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); ++ dns_name_copy(E1, E2): + S1 + S2 diff --git a/cocci/dns_name_copy.spatch b/cocci/dns_name_copy.spatch index 89e340cb4c..0fa7e8557f 100644 --- a/cocci/dns_name_copy.spatch +++ b/cocci/dns_name_copy.spatch @@ -3,21 +3,21 @@ expression E1, E2; @@ - dns_name_copy(E1, E2, NULL); -+ RUNTIME_CHECK(dns_name_copy(E1, E2, NULL) == ISC_R_SUCCESS); ++ dns_name_copy(E1, E2); @@ expression E1, E2; @@ - (void)dns_name_copy(E1, E2, NULL); -+ RUNTIME_CHECK(dns_name_copy(E1, E2, NULL) == ISC_R_SUCCESS); ++ dns_name_copy(E1, E2); @@ expression E1, E2; @@ - return (dns_name_copy(E1, E2, NULL)); -+ RUNTIME_CHECK(dns_name_copy(E1, E2, NULL) == ISC_R_SUCCESS); ++ dns_name_copy(E1, E2); + return (ISC_R_SUCCESS); // ./bin/named/query.c processing broken with this rule, fix manually @@ -27,4 +27,4 @@ expression E1, E2; // // - V = dns_name_copy(E1, E2, NULL); // - RUNTIME_CHECK(V == ISC_R_SUCCESS); -// + RUNTIME_CHECK(dns_name_copy(E1, E2, NULL) == ISC_R_SUCCESS); +// + dns_name_copy(E1, E2); diff --git a/cocci/dns_name_copynf.spatch b/cocci/dns_name_copynf.spatch index 7853b679e0..079a40e9d7 100644 --- a/cocci/dns_name_copynf.spatch +++ b/cocci/dns_name_copynf.spatch @@ -3,4 +3,4 @@ expression E1, E2; @@ - RUNTIME_CHECK(dns_name_copy(E1, E2, NULL) == ISC_R_SUCCESS); -+ dns_name_copynf(E1, E2); ++ dns_name_copy(E1, E2);