Commit 4b6b9874 authored by Jan Kadlec's avatar Jan Kadlec

Review-based fixes.

parent f14167fd
......@@ -2400,8 +2400,8 @@ static int xfrin_mark_empty(knot_node_t **node_p, void *data)
if (node->rrset_count == 0 && node->children == 0 &&
!knot_node_is_empty(node)) {
/*!
* Mark this node and all parent nodes that have 0 RRSets
* for removal.
* Mark this node and all parent nodes that have 0 RRSets and
* no children for removal.
*/
int ret = add_node_to_list(node, l);
if (ret != KNOT_EOK) {
......@@ -2440,7 +2440,10 @@ static int xfrin_remove_empty_nodes(knot_zone_contents_t *z)
node_t *nxt = NULL;
WALK_LIST_DELSAFE(n, nxt, l) {
knot_node_ln_t *list_node = (knot_node_ln_t *)n;
knot_zone_contents_remove_node(z, list_node->node->owner);
ret = knot_zone_contents_remove_node(z, list_node->node->owner);
if (ret != KNOT_EOK) {
return ret;
}
knot_node_free(&list_node->node);
free(n);
}
......@@ -2455,7 +2458,10 @@ static int xfrin_remove_empty_nodes(knot_zone_contents_t *z)
WALK_LIST_DELSAFE(n, nxt, l) {
knot_node_ln_t *list_node = (knot_node_ln_t *)n;
knot_zone_contents_remove_nsec3_node(z, list_node->node->owner);
ret = knot_zone_contents_remove_nsec3_node(z, list_node->node->owner);
if (ret != KNOT_EOK) {
return ret;
}
knot_node_free(&list_node->node);
free(n);
}
......
......@@ -856,6 +856,7 @@ dbg_zone_exec_verb(
if (ret != KNOT_EOK) {
return KNOT_ENONODE;
}
assert(removed_node);
return KNOT_EOK;
}
......@@ -876,6 +877,7 @@ int knot_zone_contents_remove_nsec3_node(knot_zone_contents_t *contents,
if (ret != KNOT_EOK) {
return KNOT_ENONODE;
}
assert(removed_node);
return KNOT_EOK;
}
......
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