Commit 3af66745 authored by Brian Wellington's avatar Brian Wellington
Browse files

Use the nxt rdatastruct instead of an ugly hack.

parent 3568cef9
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: dnssec-signzone.c,v 1.108 2000/10/28 00:53:39 bwelling Exp $ */ /* $Id: dnssec-signzone.c,v 1.109 2000/10/28 01:09:36 bwelling Exp $ */
#include <config.h> #include <config.h>
...@@ -655,21 +655,17 @@ haschildkey(dns_db_t *db, dns_name_t *name) { ...@@ -655,21 +655,17 @@ haschildkey(dns_db_t *db, dns_name_t *name) {
*/ */
static void static void
nxt_setbit(dns_rdataset_t *rdataset, dns_rdatatype_t type) { nxt_setbit(dns_rdataset_t *rdataset, dns_rdatatype_t type) {
unsigned char *nxt_bits;
dns_name_t nxtname;
isc_region_t r, r2;
isc_result_t result; isc_result_t result;
dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t rdata = DNS_RDATA_INIT;
dns_rdata_nxt_t nxt;
result = dns_rdataset_first(rdataset); result = dns_rdataset_first(rdataset);
check_result(result, "dns_rdataset_first()"); check_result(result, "dns_rdataset_first()");
dns_rdataset_current(rdataset, &rdata); dns_rdataset_current(rdataset, &rdata);
dns_rdata_toregion(&rdata, &r); result = dns_rdata_tostruct(&rdata, &nxt, NULL);
dns_name_init(&nxtname, NULL); check_result(result, "dns_rdata_tostruct");
dns_name_fromregion(&nxtname, &r); set_bit(nxt.typebits, type, 1);
dns_name_toregion(&nxtname, &r2); dns_rdata_freestruct(&nxt);
nxt_bits = r.base + r2.length;
set_bit(nxt_bits, type, 1);
} }
static void static void
......
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