Commit f3f1cab0 authored by Evan Hunt's avatar Evan Hunt
Browse files

clean up coccinelle patches for dns_name_copy()

no need for semantic patches to use dns_name_copynf() any longer.
parent b0aadaac
......@@ -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
......@@ -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);
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment