Commit 8d008539 authored by Jan Kadlec's avatar Jan Kadlec

libknot: Added RRSet emptiness check to knot_rrset_equal()

parent 429d31bd
......@@ -118,11 +118,6 @@ static bool apex_rr_changed(const zone_contents_t *old_contents,
{
knot_rrset_t old_rr = node_rrset(old_contents->apex, type);
knot_rrset_t new_rr = node_rrset(new_contents->apex, type);
if (knot_rrset_empty(&old_rr)) {
return !knot_rrset_empty(&new_rr);
} else if (knot_rrset_empty(&new_rr)) {
return !knot_rrset_empty(&old_rr);
}
return !knot_rrset_equal(&old_rr, &new_rr, KNOT_RRSET_COMPARE_WHOLE);
}
......
......@@ -571,6 +571,12 @@ bool knot_rrset_equal(const knot_rrset_t *r1,
return r1 == r2;
}
if (knot_rrset_empty(r1)) {
return knot_rrset_empty(r2);
} else if (knot_rrset_empty(r2)) {
return knot_rrset_empty(r1);
}
if (r1->type != r2->type) {
return false;
}
......
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