Commit 80b782f3 authored by Mark Andrews's avatar Mark Andrews
Browse files

1447. [bug] We were casting (unsigned int) to and from (void *).

                        rdataset->private4 is now rdataset->privateuint4
                        to reflect a type change.
developer: marka
reviewer: explorer
parent 6a2f7bba
1447. [bug] We were casting (unsigned int) to and from (void *).
rdataset->private4 is now rdataset->privateuint4
to reflect a type change.
1446. [func] Implemented undocumented alternate transfer sources
from BIND 8. See use-alt-transfer-source,
alt-transfer-source-v4 and alt-transfer-source-v6.
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdataset.h,v 1.46 2003/01/18 03:18:31 marka Exp $ */
/* $Id: rdataset.h,v 1.47 2003/02/26 23:52:30 marka Exp $ */
#ifndef DNS_RDATASET_H
#define DNS_RDATASET_H 1
......@@ -104,7 +104,7 @@ struct dns_rdataset {
void * private1;
void * private2;
void * private3;
void * private4;
unsigned int privateuint4;
void * private5;
};
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ncache.c,v 1.31 2003/01/18 03:18:30 marka Exp $ */
/* $Id: ncache.c,v 1.32 2003/02/26 23:52:29 marka Exp $ */
#include <config.h>
......@@ -398,12 +398,12 @@ rdataset_first(dns_rdataset_t *rdataset) {
}
raw += 2;
/*
* The private4 field is the number of rdata beyond the cursor
* The privateuint4 field is the number of rdata beyond the cursor
* position, so we decrement the total count by one before storing
* it.
*/
count--;
rdataset->private4 = (void *)count;
rdataset->privateuint4 = count;
rdataset->private5 = raw;
return (ISC_R_SUCCESS);
......@@ -415,11 +415,11 @@ rdataset_next(dns_rdataset_t *rdataset) {
unsigned int length;
unsigned char *raw;
count = (unsigned int)rdataset->private4;
count = rdataset->privateuint4;
if (count == 0)
return (ISC_R_NOMORE);
count--;
rdataset->private4 = (void *)count;
rdataset->privateuint4 = count;
raw = rdataset->private5;
length = raw[0] * 256 + raw[1];
raw += length + 2;
......@@ -448,7 +448,7 @@ rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
/*
* Reset iterator state.
*/
target->private4 = NULL;
target->privateuint4 = 0;
target->private5 = NULL;
}
......@@ -543,7 +543,7 @@ dns_ncache_getrdataset(dns_rdataset_t *ncacherdataset, dns_name_t *name,
/*
* Reset iterator state.
*/
rdataset->private4 = NULL;
rdataset->privateuint4 = 0;
rdataset->private5 = NULL;
return (ISC_R_SUCCESS);
}
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rbtdb.c,v 1.184 2003/01/18 03:18:30 marka Exp $ */
/* $Id: rbtdb.c,v 1.185 2003/02/26 23:52:29 marka Exp $ */
/*
* Principal Author: Bob Halley
......@@ -1320,7 +1320,7 @@ bind_rdataset(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
/*
* Reset iterator state.
*/
rdataset->private4 = NULL;
rdataset->privateuint4 = 0;
rdataset->private5 = NULL;
}
......@@ -4622,12 +4622,12 @@ rdataset_first(dns_rdataset_t *rdataset) {
}
raw += 2;
/*
* The private4 field is the number of rdata beyond the cursor
* The privateuint4 field is the number of rdata beyond the cursor
* position, so we decrement the total count by one before storing
* it.
*/
count--;
rdataset->private4 = (void *)count;
rdataset->privateuint4 = count;
rdataset->private5 = raw;
return (ISC_R_SUCCESS);
......@@ -4639,11 +4639,11 @@ rdataset_next(dns_rdataset_t *rdataset) {
unsigned int length;
unsigned char *raw;
count = (unsigned int)rdataset->private4;
count = rdataset->privateuint4;
if (count == 0)
return (ISC_R_NOMORE);
count--;
rdataset->private4 = (void *)count;
rdataset->privateuint4 = count;
raw = rdataset->private5;
length = raw[0] * 256 + raw[1];
raw += length + 2;
......@@ -4677,7 +4677,7 @@ rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
/*
* Reset iterator state.
*/
target->private4 = NULL;
target->privateuint4 = 0;
target->private5 = NULL;
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdatalist.c,v 1.25 2001/01/09 21:51:21 bwelling Exp $ */
/* $Id: rdatalist.c,v 1.26 2003/02/26 23:52:29 marka Exp $ */
#include <config.h>
......@@ -74,7 +74,7 @@ dns_rdatalist_tordataset(dns_rdatalist_t *rdatalist,
rdataset->private1 = rdatalist;
rdataset->private2 = NULL;
rdataset->private3 = NULL;
rdataset->private4 = NULL;
rdataset->privateuint4 = 0;
rdataset->private5 = NULL;
return (ISC_R_SUCCESS);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdataset.c,v 1.66 2002/12/05 04:36:26 marka Exp $ */
/* $Id: rdataset.c,v 1.67 2003/02/26 23:52:29 marka Exp $ */
#include <config.h>
......@@ -52,7 +52,7 @@ dns_rdataset_init(dns_rdataset_t *rdataset) {
rdataset->private1 = NULL;
rdataset->private2 = NULL;
rdataset->private3 = NULL;
rdataset->private4 = NULL;
rdataset->privateuint4 = 0;
rdataset->private5 = NULL;
}
......@@ -77,7 +77,7 @@ dns_rdataset_invalidate(dns_rdataset_t *rdataset) {
rdataset->private1 = NULL;
rdataset->private2 = NULL;
rdataset->private3 = NULL;
rdataset->private4 = NULL;
rdataset->privateuint4 = 0;
rdataset->private5 = NULL;
}
......@@ -103,7 +103,7 @@ dns_rdataset_disassociate(dns_rdataset_t *rdataset) {
rdataset->private1 = NULL;
rdataset->private2 = NULL;
rdataset->private3 = NULL;
rdataset->private4 = NULL;
rdataset->privateuint4 = 0;
rdataset->private5 = NULL;
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdataslab.c,v 1.32 2002/11/12 23:24:45 explorer Exp $ */
/* $Id: rdataslab.c,v 1.33 2003/02/26 23:52:29 marka Exp $ */
#include <config.h>
......@@ -169,12 +169,12 @@ rdataset_first(dns_rdataset_t *rdataset) {
}
raw += 2;
/*
* The private4 field is the number of rdata beyond the cursor
* The privateuint4 field is the number of rdata beyond the cursor
* position, so we decrement the total count by one before storing
* it.
*/
count--;
rdataset->private4 = (void *)count;
rdataset->privateuint4 = count;
rdataset->private5 = raw;
return (ISC_R_SUCCESS);
......@@ -186,11 +186,11 @@ rdataset_next(dns_rdataset_t *rdataset) {
unsigned int length;
unsigned char *raw;
count = (unsigned int)rdataset->private4;
count = rdataset->privateuint4;
if (count == 0)
return (ISC_R_NOMORE);
count--;
rdataset->private4 = (void *)count;
rdataset->privateuint4 = count;
raw = rdataset->private5;
length = raw[0] * 256 + raw[1];
raw += length + 2;
......@@ -219,7 +219,7 @@ rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
/*
* Reset iterator state.
*/
target->private4 = NULL;
target->privateuint4 = 0;
target->private5 = NULL;
}
......@@ -264,7 +264,7 @@ dns_rdataslab_tordataset(unsigned char *slab, unsigned int reservelen,
/*
* Reset iterator state.
*/
rdataset->private4 = NULL;
rdataset->privateuint4 = 0;
rdataset->private5 = NULL;
}
......
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