Skip to content
Snippets Groups Projects
Commit 1703fea2 authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Proper check for empty list added.

Refs #89
parent 75452213
No related branches found
No related tags found
No related merge requests found
......@@ -142,7 +142,8 @@ int knot_changeset_add_rr(knot_changeset_t *chgs, knot_rrset_t *rr,
// Just check the last RRSet. If the RR belongs to it, merge it,
// otherwise just add the RR to the end of the list
list *l = part == KNOT_CHANGESET_ADD ? &(chgs->add) : &(chgs->remove);
knot_rrset_t *tail_rr = l ? ((knot_rr_node_t *)(l->tail))->rr : NULL;
knot_rrset_t *tail_rr =
!EMPTY_LIST(*l) ? ((knot_rr_node_t *)(TAIL(*l)))->rr : NULL;
if (tail_rr && knot_changeset_rrsets_match(tail_rr, rr)) {
// Create changesets exactly as they came, with possibly
......
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