Commit 957201ea authored by Daniel Salzman's avatar Daniel Salzman

node: remove unused function node_set_parent

parent 153b87e8
......@@ -346,21 +346,6 @@ knot_rdataset_t *node_rdataset(const zone_node_t *node, uint16_t type)
return NULL;
}
void node_set_parent(zone_node_t *node, zone_node_t *parent)
{
// node must not have any parent previously
assert(node != NULL);
assert(node->parent == NULL);
// set the parent
node->parent = parent;
// increase the count of children of the new parent
if (parent != NULL) {
++parent->children;
}
}
bool node_rrtype_is_signed(const zone_node_t *node, uint16_t type)
{
if (node == NULL) {
......
......@@ -221,14 +221,6 @@ knot_rrset_t *node_create_rrset(const zone_node_t *node, uint16_t type);
*/
knot_rdataset_t *node_rdataset(const zone_node_t *node, uint16_t type);
/*!
* \brief Sets the parent of the node. Also adjusts children count of parent.
*
* \param node Node to set the parent of.
* \param parent Parent to set to the node.
*/
void node_set_parent(zone_node_t *node, zone_node_t *parent);
/*!
* \brief Returns parent node (fixing bi-node issue) of given node.
*/
......
......@@ -56,14 +56,6 @@ int main(int argc, char *argv[])
assert(node);
ok(knot_dname_is_equal(node->owner, dummy_owner), "Node: new - set fields");
// Test parent setting
zone_node_t *parent = node_new(dummy_owner, false, false, NULL);
assert(parent);
node_set_parent(node, parent);
ok(node_parent(node) == parent && parent->children == 1, "Node: set parent.");
node_free(parent, NULL);
// Test RRSet addition
knot_rrset_t *dummy_rrset = create_dummy_rrset(dummy_owner, KNOT_RRTYPE_TXT);
int ret = node_add_rrset(node, dummy_rrset, NULL);
......
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