mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
chain->level_matches can be -1 in find_deepest_zonecut() if the node that
was found is in the topmost tree; so compare > 0 rather than != 0. cast RBTDB_RDATATYPE_{BASE,EXT}() to dns_rdatatype_t to shut up NT's CL. The value of each is already suitably bit masked to dns_rdatatype_t size. #undef IGNORE before making a new definition; CL's winbase.h defines it. 2nd parameter of allocate_version changed from "unsigned int serial" to "rbtdb_serial_t serial" to have proper sizing when compiled as rbtdb64.c. cast header->type in two function calls to dns_rdatatype_t.
This commit is contained in:
parent
a9ece9973c
commit
1398d0a72d
@ -70,8 +70,8 @@ typedef isc_uint32_t rbtdb_serial_t;
|
||||
|
||||
typedef isc_uint32_t rbtdb_rdatatype_t;
|
||||
|
||||
#define RBTDB_RDATATYPE_BASE(type) ((type) & 0xFFFF)
|
||||
#define RBTDB_RDATATYPE_EXT(type) ((type) >> 16)
|
||||
#define RBTDB_RDATATYPE_BASE(type) ((dns_rdatatype_t)((type) & 0xFFFF))
|
||||
#define RBTDB_RDATATYPE_EXT(type) ((dns_rdatatype_t)((type) >> 16))
|
||||
#define RBTDB_RDATATYPE_VALUE(b, e) (((e) << 16) | (b))
|
||||
|
||||
#define RBTDB_RDATATYPE_SIGNXT \
|
||||
@ -102,6 +102,8 @@ typedef struct rdatasetheader {
|
||||
#define RDATASET_ATTR_STALE 0x02
|
||||
#define RDATASET_ATTR_IGNORE 0x04
|
||||
|
||||
#undef IGNORE /* WIN32 winbase.h defines this. */
|
||||
|
||||
#define EXISTS(header) \
|
||||
(((header)->attributes & RDATASET_ATTR_NONEXISTENT) == 0)
|
||||
#define NONEXISTENT(header) \
|
||||
@ -392,7 +394,7 @@ currentversion(dns_db_t *db, dns_dbversion_t **versionp) {
|
||||
}
|
||||
|
||||
static inline rbtdb_version_t *
|
||||
allocate_version(isc_mem_t *mctx, unsigned int serial,
|
||||
allocate_version(isc_mem_t *mctx, rbtdb_serial_t serial,
|
||||
unsigned int references, isc_boolean_t writer)
|
||||
{
|
||||
rbtdb_version_t *version;
|
||||
@ -2153,7 +2155,7 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
|
||||
dns_rbt_namefromnode(node, &name);
|
||||
result = dns_name_concatenate(&name, NULL,
|
||||
foundname, NULL);
|
||||
while (result == DNS_R_SUCCESS && i != 0) {
|
||||
while (result == DNS_R_SUCCESS && i > 0) {
|
||||
i--;
|
||||
level_node = search->chain.levels[i];
|
||||
dns_name_init(&name, NULL);
|
||||
@ -2920,7 +2922,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
|
||||
(unsigned int)(sizeof *newheader),
|
||||
rbtdb->common.mctx,
|
||||
rbtdb->common.rdclass,
|
||||
header->type,
|
||||
(dns_rdatatype_t)header->type,
|
||||
force,
|
||||
&merged);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
@ -3157,7 +3159,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
||||
(unsigned int)(sizeof *newheader),
|
||||
rbtdb->common.mctx,
|
||||
rbtdb->common.rdclass,
|
||||
header->type,
|
||||
(dns_rdatatype_t)header->type,
|
||||
&subresult);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
free_rdataset(rbtdb->common.mctx, newheader);
|
||||
|
Loading…
x
Reference in New Issue
Block a user