From: Evan Hunt Date: Tue, 12 Mar 2024 18:51:53 +0000 (-0700) Subject: remove dead code in rbtdb.c X-Git-Tag: v9.19.23~39^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=b3c8b5cfb254ce7868ab403ea60db75b5f2c38b6;p=thirdparty%2Fbind9.git 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. --- diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index d567c99d803..92fb702575c 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -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); }