Skip to content
Snippets Groups Projects
Commit d830830c authored by Lubos Slovak's avatar Lubos Slovak
Browse files

Optimized handling of orphaned RRSIGs.

- Adding to the beginning of the list.
parent 548152d3
No related branches found
No related tags found
No related merge requests found
......@@ -288,19 +288,13 @@ static int xfrin_add_orphan_rrsig(xfrin_orphan_rrsig_t **rrsigs,
assert(last == NULL);
assert(&last != rrsigs);
last = *rrsigs;
/* Get to the end of the list. */
while (last->next != NULL) {
last = last->next;
}
// the RRSIG is not in the list, add to the front
xfrin_orphan_rrsig_t *new_item = malloc(sizeof(xfrin_orphan_rrsig_t));
CHECK_ALLOC_LOG(new_item, KNOT_ENOMEM);
new_item->rrsig = rr;
new_item->next = NULL;
new_item->next = *rrsigs;
last->next = new_item;
*rrsigs = new_item;
return KNOT_EOK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment