remove #ifndef DNS_RBT_USEHASH from rbtdb.c

- this was a compile time option to disable the use of a hash table in
  the RBTDB. the code path without the hash table was buggy and
  untested, and unlikely to be needed by anyone anyway.
This commit is contained in:
Evan Hunt
2018-04-20 14:37:31 -07:00
parent 5354adc403
commit 7fbffa6c44
3 changed files with 54 additions and 115 deletions

View File

@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
#ifndef DNS_RBT_H
#define DNS_RBT_H 1
@@ -25,8 +24,6 @@
ISC_LANG_BEGINDECLS
#define DNS_RBT_USEHASH 1
/*@{*/
/*%
* Option values for dns_rbt_findnode() and dns_rbt_findname().
@@ -108,7 +105,7 @@ struct dns_rbtnode {
unsigned int oldnamelen : 8; /*%< range is 1..255 */
/*@}*/
/* flags needed for serialization to file*/
/* flags needed for serialization to file */
unsigned int is_mmapped : 1;
unsigned int parent_is_relative : 1;
unsigned int left_is_relative : 1;
@@ -120,11 +117,15 @@ struct dns_rbtnode {
unsigned int rpz : 1;
unsigned int :0; /* end of bitfields c/o tree lock */
#ifdef DNS_RBT_USEHASH
/*%
* These are needed for hashing. The 'uppernode' points to the
* node's superdomain node in the parent subtree, so that it can
* be reached from a child that was found by a hash lookup.
*/
unsigned int hashval;
dns_rbtnode_t *uppernode;
dns_rbtnode_t *hashnext;
#endif
dns_rbtnode_t *parent;
dns_rbtnode_t *left;
dns_rbtnode_t *right;