]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Cleanup dns_fwdtable_delete()
authorAram Sargsyan <aram@isc.org>
Wed, 4 May 2022 09:43:49 +0000 (09:43 +0000)
committerAram Sargsyan <aram@isc.org>
Thu, 9 Jun 2022 10:47:04 +0000 (10:47 +0000)
The conversion of `DNS_R_PARTIALMATCH` into `DNS_R_NOTFOUND` is done
in the `dns_rbt_deletename()` function so there is no need to do that
in `dns_fwdtable_delete()`.

Add a possible return value of `ISC_R_NOSPACE` into the header file's
function description comment.

lib/dns/forward.c
lib/dns/include/dns/forward.h

index cd4959a76dacb6d3a1a5d79f4a2bfd66b72e73fd..9fe4d262aeb44379364be1b3fac83953818862db 100644 (file)
@@ -161,10 +161,6 @@ dns_fwdtable_delete(dns_fwdtable_t *fwdtable, const dns_name_t *name) {
        result = dns_rbt_deletename(fwdtable->table, name, false);
        RWUNLOCK(&fwdtable->rwlock, isc_rwlocktype_write);
 
-       if (result == DNS_R_PARTIALMATCH) {
-               result = ISC_R_NOTFOUND;
-       }
-
        return (result);
 }
 
index b78d400f18e1cc98ea254e5fd9d24da8db6c7190..a82182670427340f90df5ef7cc6010b5a386dace 100644 (file)
@@ -86,6 +86,7 @@ dns_fwdtable_delete(dns_fwdtable_t *fwdtable, const dns_name_t *name);
  * Returns:
  * \li #ISC_R_SUCCESS
  * \li #ISC_R_NOTFOUND
+ * \li #ISC_R_NOSPACE
  */
 
 isc_result_t