From: Evan Hunt Date: Sat, 22 May 2021 00:59:09 +0000 (-0700) Subject: clean up coccinelle patches for dns_name_copy() X-Git-Tag: v9.17.14~33^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3f1cab05e05c9bdd5da91f3ab159ec6658ec7f4;p=thirdparty%2Fbind9.git clean up coccinelle patches for dns_name_copy() no need for semantic patches to use dns_name_copynf() any longer. --- diff --git a/cocci/dns_name_copy-with-result.spatch b/cocci/dns_name_copy-with-result.spatch index c4555c3a765..129d421d672 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 89e340cb4c4..0fa7e8557f0 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 7853b679e07..079a40e9d7c 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);