From 27acf56ba35186f2cdf03094b5422dedc0841adb Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 18 Oct 2021 14:05:37 +1100 Subject: [PATCH] Remove unnecessary dns_rbt_fullnamefromnode call the results from dns_rbt_fullnamefromnode are not used. --- lib/dns/rbtdb.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 5814f3e6a5..70893ee029 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -1745,18 +1745,15 @@ delete_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) { switch (node->nsec) { case DNS_RBT_NSEC_NORMAL: + result = dns_rbt_deletenode(rbtdb->tree, node, false); + break; + case DNS_RBT_NSEC_HAS_NSEC: /* * Though this may be wasteful, it has to be done before * node is deleted. */ name = dns_fixedname_initname(&fname); dns_rbt_fullnamefromnode(node, name); - - result = dns_rbt_deletenode(rbtdb->tree, node, false); - break; - case DNS_RBT_NSEC_HAS_NSEC: - name = dns_fixedname_initname(&fname); - dns_rbt_fullnamefromnode(node, name); /* * Delete the corresponding node from the auxiliary NSEC * tree before deleting from the main tree.