mirror of
https://github.com/isc-projects/bind9.git
synced 2026-07-15 21:13:30 -04:00
remove dead code in rbtdb.c
dns_db_addrdataset() enforces a requirement that version can only be NULL for a cache database. code that checks for zone semantics and version == NULL can never be reached.
This commit is contained in:
parent
29f1c93734
commit
b3c8b5cfb2
1 changed files with 2 additions and 8 deletions
|
|
@ -1627,6 +1627,8 @@ dns__rbtdb_setsecure(dns_db_t *db, dns_rbtdb_version_t *version,
|
|||
bool hasnsec = false;
|
||||
isc_result_t result;
|
||||
|
||||
REQUIRE(version != NULL);
|
||||
|
||||
dns_rdataset_init(&keyset);
|
||||
result = dns_db_findrdataset(db, origin, version, dns_rdatatype_dnskey,
|
||||
0, 0, &keyset, NULL);
|
||||
|
|
@ -3446,14 +3448,6 @@ dns__rbtdb_addrdataset(dns_db_t *db, dns_dbnode_t *node,
|
|||
}
|
||||
INSIST(tlocktype == isc_rwlocktype_none);
|
||||
|
||||
/*
|
||||
* Update the zone's secure status. If version is non-NULL
|
||||
* this is deferred until dns__rbtdb_closeversion() is called.
|
||||
*/
|
||||
if (result == ISC_R_SUCCESS && version == NULL && !IS_CACHE(rbtdb)) {
|
||||
dns__rbtdb_setsecure(db, version, rbtdb->origin_node);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue