2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

in dns_name_isabsolute(), dns_name_fullcompare(),

and dns_name_compare(), do not require that the name has >0 labels
so that these functions can be used on the degenerate relative name @
This commit is contained in:
Andreas Gustafsson
2000-08-08 23:18:12 +00:00
parent 7048bc2b71
commit f4bc158a46
2 changed files with 2 additions and 15 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: name.h,v 1.78 2000/08/01 01:24:22 tale Exp $ */
/* $Id: name.h,v 1.79 2000/08/08 23:18:12 gson Exp $ */
#ifndef DNS_NAME_H
#define DNS_NAME_H 1
@@ -335,8 +335,6 @@ dns_name_isabsolute(const dns_name_t *name);
* Requires:
* 'name' is a valid name
*
* dns_name_countlabels(name) > 0
*
* Returns:
* TRUE The last label in 'name' is the root label.
* FALSE The last label in 'name' is not the root label.
@@ -454,12 +452,8 @@ dns_name_compare(const dns_name_t *name1, const dns_name_t *name2);
* Requires:
* 'name1' is a valid name
*
* dns_name_countlabels(name1) > 0
*
* 'name2' is a valid name
*
* dns_name_countlabels(name2) > 0
*
* Either name1 is absolute and name2 is absolute, or neither is.
*
* Returns:
@@ -534,12 +528,8 @@ dns_name_issubdomain(const dns_name_t *name1, const dns_name_t *name2);
* Requires:
* 'name1' is a valid name
*
* dns_name_countlabels(name1) > 0
*
* 'name2' is a valid name
*
* dns_name_countlabels(name2) > 0
*
* Either name1 is absolute and name2 is absolute, or neither is.
*
* Returns:

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: name.c,v 1.100 2000/08/01 01:22:33 tale Exp $ */
/* $Id: name.c,v 1.101 2000/08/08 23:18:10 gson Exp $ */
#include <config.h>
@@ -383,7 +383,6 @@ dns_name_isabsolute(const dns_name_t *name) {
*/
REQUIRE(VALID_NAME(name));
REQUIRE(name->labels > 0);
if ((name->attributes & DNS_NAMEATTR_ABSOLUTE) != 0)
return (ISC_TRUE);
@@ -509,9 +508,7 @@ dns_name_fullcompare(const dns_name_t *name1, const dns_name_t *name2,
*/
REQUIRE(VALID_NAME(name1));
REQUIRE(name1->labels > 0);
REQUIRE(VALID_NAME(name2));
REQUIRE(name2->labels > 0);
REQUIRE(orderp != NULL);
REQUIRE(nlabelsp != NULL);
REQUIRE(nbitsp != NULL);