Commit 73f53f4b authored by Jan Včelák's avatar Jan Včelák 🚀

remove unused functions

parent e92b42bc
......@@ -702,20 +702,6 @@ static int recreate_nsec3_tree(const zone_contents_t *z, zone_contents_t *out)
return KNOT_EOK;
}
static zone_node_t *get_previous(const zone_contents_t *zone,
const knot_dname_t *name)
{
if (zone == NULL || name == NULL) {
return NULL;
}
zone_node_t *found = NULL, *prev = NULL;
(void)find_in_tree(zone->nodes, name, &found, &prev);
assert(prev != NULL);
return prev;
}
// Public API
int zone_contents_add_rr(zone_contents_t *z, const knot_rrset_t *rr,
......@@ -828,12 +814,6 @@ int zone_contents_find_dname(const zone_contents_t *zone,
}
}
const zone_node_t *zone_contents_find_previous(const zone_contents_t *zone,
const knot_dname_t *name)
{
return get_previous(zone, name);
}
const zone_node_t *zone_contents_find_nsec3_node(const zone_contents_t *zone,
const knot_dname_t *name)
{
......
......@@ -130,17 +130,6 @@ int zone_contents_find_dname(const zone_contents_t *contents,
const zone_node_t **closest,
const zone_node_t **previous);
/*!
* \brief Finds previous name in canonical order to the given name in the zone.
*
* \param zone Zone to search for the name.
* \param name Domain name to find the previous domain name of.
*
* \return Previous node in canonical order, or NULL if some parameter is wrong.
*/
const zone_node_t *zone_contents_find_previous(const zone_contents_t *contents,
const knot_dname_t *name);
/*!
* \brief Tries to find a node with the specified name among the NSEC3 nodes
* of the zone.
......
......@@ -121,38 +121,6 @@ int zone_tree_get_less_or_equal(zone_tree_t *tree,
return exact_match;
}
zone_node_t *zone_tree_get_next(zone_tree_t *tree,
const knot_dname_t *owner)
{
if (tree == NULL || owner == NULL) {
return NULL;
}
uint8_t lf[KNOT_DNAME_MAXLEN];
knot_dname_lf(lf, owner, NULL);
value_t *fval = NULL;
zone_node_t *n = NULL;
(void)hattrie_find_next(tree, (char*)lf + 1, *lf, &fval);
if (fval == NULL) {
/* Return first node. */
hattrie_iter_t *it = hattrie_iter_begin(tree, true);
if (it == NULL) {
return NULL;
}
fval = hattrie_iter_val(it);
hattrie_iter_free(it);
}
n = (zone_node_t *)*fval;
/* Next node must be non-empty and auth. */
if (n->rrset_count == 0 || n->flags & NODE_FLAGS_NONAUTH) {
return zone_tree_get_next(tree, n->owner);
} else {
return n;
}
}
int zone_tree_remove(zone_tree_t *tree,
const knot_dname_t *owner,
zone_node_t **removed)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment