Commit c3b55421 authored by Evan Hunt's avatar Evan Hunt
Browse files

[master] check for physical equivalence in names

3599.	[tuning]	Check for pointer equivalence in name comparisons.
			[RT #18125]
parent 77fa1a27
3599. [tuning] Check for pointer equivalence in name comparisons.
[RT #18125]
3598. [cleanup] Improved portability of map file code. [RT #33820]
3597. [bug] Ensure automatic-resigning heaps are reconstructed
......
......@@ -618,6 +618,11 @@ dns_name_fullcompare(const dns_name_t *name1, const dns_name_t *name2,
REQUIRE((name1->attributes & DNS_NAMEATTR_ABSOLUTE) ==
(name2->attributes & DNS_NAMEATTR_ABSOLUTE));
if (name1 == name2) {
*orderp = 0;
return (dns_namereln_equal);
}
SETUP_OFFSETS(name1, offsets1, odata1);
SETUP_OFFSETS(name2, offsets2, odata2);
......@@ -731,6 +736,9 @@ dns_name_equal(const dns_name_t *name1, const dns_name_t *name2) {
REQUIRE((name1->attributes & DNS_NAMEATTR_ABSOLUTE) ==
(name2->attributes & DNS_NAMEATTR_ABSOLUTE));
if (name1 == name2)
return (ISC_TRUE);
if (name1->length != name2->length)
return (ISC_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