From: Aram Sargsyan Date: Wed, 4 May 2022 09:43:49 +0000 (+0000) Subject: Cleanup dns_fwdtable_delete() X-Git-Tag: v9.19.3~60^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=887aa7a2904d74021dfd9b7615f22625dee5d729;p=thirdparty%2Fbind9.git Cleanup dns_fwdtable_delete() 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. --- diff --git a/lib/dns/forward.c b/lib/dns/forward.c index cd4959a76da..9fe4d262aeb 100644 --- a/lib/dns/forward.c +++ b/lib/dns/forward.c @@ -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); } diff --git a/lib/dns/include/dns/forward.h b/lib/dns/include/dns/forward.h index b78d400f18e..a8218267042 100644 --- a/lib/dns/include/dns/forward.h +++ b/lib/dns/include/dns/forward.h @@ -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