minor findnode optimization

when searching for a node so that we can delete an rdataset,
it is not necessary to set the 'create' flag. if the node doesn't
exist yet, we wouldn't be able delete anything from it.
This commit is contained in:
Evan Hunt
2024-06-07 17:24:45 -07:00
parent a7e6c06ef7
commit 90f29d61d2
+1 -2
View File
@@ -5190,7 +5190,7 @@ validated(void *arg) {
result = ISC_R_NOTFOUND;
if (val->rdataset != NULL) {
result = dns_db_findnode(fctx->cache, val->name,
true, &node);
false, &node);
}
if (result == ISC_R_SUCCESS) {
(void)dns_db_deleterdataset(fctx->cache, node,
@@ -5815,7 +5815,6 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_message_t *message,
/*
* Find or create the cache node.
*/
node = NULL;
result = dns_db_findnode(fctx->cache, name, true, &node);
if (result != ISC_R_SUCCESS) {
return (result);