2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

backed out inappropriate use of RETERR() in

*_compare(); renamed 'result' to 'order' to avoid future confusion
This commit is contained in:
Andreas Gustafsson
2000-03-17 21:43:46 +00:00
parent d10099d866
commit e6c22f37d8
2 changed files with 16 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: sig_24.c,v 1.29 2000/03/17 19:20:25 gson Exp $ */
/* $Id: sig_24.c,v 1.30 2000/03/17 21:43:46 gson Exp $ */
/* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */
@@ -266,6 +266,7 @@ compare_sig(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
isc_region_t r2;
dns_name_t name1;
dns_name_t name2;
int order;
REQUIRE(rdata1->type == rdata2->type);
REQUIRE(rdata1->rdclass == rdata2->rdclass);
@@ -278,7 +279,9 @@ compare_sig(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
INSIST(r2.length > 18);
r1.length = 18;
r2.length = 18;
RETERR(compare_region(&r1, &r2));
order = compare_region(&r1, &r2);
if (order != 0)
return (order);
dns_name_init(&name1, NULL);
dns_name_init(&name2, NULL);
@@ -288,7 +291,9 @@ compare_sig(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
isc_region_consume(&r2, 18);
dns_name_fromregion(&name1, &r1);
dns_name_fromregion(&name2, &r2);
RETERR(dns_name_rdatacompare(&name1, &name2));
order = dns_name_rdatacompare(&name1, &name2);
if (order != 0)
return (order);
isc_region_consume(&r1, name_length(&name1));
isc_region_consume(&r2, name_length(&name2));

View File

@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: soa_6.c,v 1.28 2000/03/17 01:22:16 explorer Exp $ */
/* $Id: soa_6.c,v 1.29 2000/03/17 21:43:46 gson Exp $ */
/* Required: Thu Mar 16 15:18:32 PST 2000 by explorer */
@@ -219,6 +219,7 @@ compare_soa(dns_rdata_t *rdata1, dns_rdata_t *rdata2)
isc_region_t region2;
dns_name_t name1;
dns_name_t name2;
int order;
REQUIRE(rdata1->type == rdata2->type);
REQUIRE(rdata1->rdclass == rdata2->rdclass);
@@ -233,7 +234,9 @@ compare_soa(dns_rdata_t *rdata1, dns_rdata_t *rdata2)
dns_name_fromregion(&name1, &region1);
dns_name_fromregion(&name2, &region2);
RETERR(dns_name_rdatacompare(&name1, &name2));
order = dns_name_rdatacompare(&name1, &name2);
if (order != 0)
return (order);
isc_region_consume(&region1, name_length(&name1));
isc_region_consume(&region2, name_length(&name2));
@@ -244,7 +247,9 @@ compare_soa(dns_rdata_t *rdata1, dns_rdata_t *rdata2)
dns_name_fromregion(&name1, &region1);
dns_name_fromregion(&name2, &region2);
RETERR(dns_name_rdatacompare(&name1, &name2));
order = dns_name_rdatacompare(&name1, &name2);
if (order != 0)
return (order);
isc_region_consume(&region1, name_length(&name1));
isc_region_consume(&region2, name_length(&name2));