clean up rbtdb.c
in preparation for splitting up rbtdb.c, rename some types so they can be defined in dns/types.h instead of only locally. these include: - struct noqname, which is used to hold no-qname and closest-encloser proofs, and is now named dns_proof_t; - rbtdb_rdatatype_t, which is used to hold a pair of rdatatypes and is now called dns_typepair_t and defined in rdatatype.h; - rbtdb_serial_t, which is now just a uint32_t; - rdatasetheader_t and rdatasetheaderlist_t, now called dns_slabheader_t and dns_slabheaderlist_t; - rbtdb_version_t, now called dns_rbtdb_version_t. the helper functions header_from_raw() and raw_from_header() are renamed dns_slabheader_fromrdataset() and dns_slabheader_raw(). also made further style changes: - fixing uninitialized pointer variables throughout rbtdb.c; - switching some initializations to struct literals; - renaming some functions and struct members more descriptively; - replacing dns_db_secure_t with a simple bool since it no longer needs to be tri-valued.
This commit is contained in:
@@ -98,7 +98,7 @@ ownercase_test_one(const char *str1, const char *str2) {
|
||||
rbtdb_nodelock_t node_locks[1];
|
||||
dns_rbtdb_t rbtdb = { .node_locks = node_locks };
|
||||
dns_rbtnode_t rbtnode = { .locknum = 0 };
|
||||
rdatasetheader_t header = { 0 };
|
||||
dns_slabheader_t header = { 0 };
|
||||
unsigned char *raw = (unsigned char *)(&header) + sizeof(header);
|
||||
dns_rdataset_t rdataset = {
|
||||
.magic = DNS_RDATASET_MAGIC,
|
||||
@@ -158,7 +158,7 @@ ISC_RUN_TEST_IMPL(setownercase) {
|
||||
rbtdb_nodelock_t node_locks[1];
|
||||
dns_rbtdb_t rbtdb = { .node_locks = node_locks };
|
||||
dns_rbtnode_t rbtnode = { .locknum = 0 };
|
||||
rdatasetheader_t header = { 0 };
|
||||
dns_slabheader_t header = { 0 };
|
||||
unsigned char *raw = (unsigned char *)(&header) + sizeof(header);
|
||||
dns_rdataset_t rdataset = {
|
||||
.magic = DNS_RDATASET_MAGIC,
|
||||
|
||||
Reference in New Issue
Block a user