]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
clean up some unused functions
authorEvan Hunt <each@isc.org>
Thu, 6 Apr 2023 05:23:55 +0000 (22:23 -0700)
committerOndřej Surý <ondrej@isc.org>
Tue, 15 Aug 2023 12:24:46 +0000 (14:24 +0200)
dns_fwdtable_delete() was only used by dns_client_clearservers(),
which in turn was never used. both functions have now been deleted.

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

index 579b9c3aab1acbfe59c138510018fa3c1e613cca..e21270009796e10eb06f87562f858023393822ba 100644 (file)
@@ -396,23 +396,6 @@ dns_client_setservers(dns_client_t *client, dns_rdataclass_t rdclass,
        return (result);
 }
 
-isc_result_t
-dns_client_clearservers(dns_client_t *client, dns_rdataclass_t rdclass,
-                       const dns_name_t *name_space) {
-       isc_result_t result;
-
-       REQUIRE(DNS_CLIENT_VALID(client));
-       REQUIRE(rdclass == dns_rdataclass_in);
-
-       if (name_space == NULL) {
-               name_space = dns_rootname;
-       }
-
-       result = dns_fwdtable_delete(client->view->fwdtable, name_space);
-
-       return (result);
-}
-
 static isc_result_t
 getrdataset(isc_mem_t *mctx, dns_rdataset_t **rdatasetp) {
        dns_rdataset_t *rdataset;
index 20cb70947246dbe3b3a418a544931c54eb826837..df377bc202170a06f3822dd37326c2804063100d 100644 (file)
@@ -167,19 +167,6 @@ cleanup:
        return (result);
 }
 
-isc_result_t
-dns_fwdtable_delete(dns_fwdtable_t *fwdtable, const dns_name_t *name) {
-       isc_result_t result;
-
-       REQUIRE(VALID_FWDTABLE(fwdtable));
-
-       RWLOCK(&fwdtable->rwlock, isc_rwlocktype_write);
-       result = dns_rbt_deletename(fwdtable->table, name, false);
-       RWUNLOCK(&fwdtable->rwlock, isc_rwlocktype_write);
-
-       return (result);
-}
-
 isc_result_t
 dns_fwdtable_find(dns_fwdtable_t *fwdtable, const dns_name_t *name,
                  dns_name_t *foundname, dns_forwarders_t **forwardersp) {
index 543a5ffb5d03d66802cbcff07b723855c8310e33..f5aef0a4a676dfd8f4c6267ec3b73bfde64c0707 100644 (file)
@@ -174,27 +174,6 @@ dns_client_setservers(dns_client_t *client, dns_rdataclass_t rdclass,
  *\li  Anything else                           Failure.
  */
 
-isc_result_t
-dns_client_clearservers(dns_client_t *client, dns_rdataclass_t rdclass,
-                       const dns_name_t *name_space);
-/*%<
- * Remove configured recursive name servers for the 'rdclass' and 'name_space'
- * from the client.  See the description of dns_client_setservers() for
- * the requirements about 'rdclass' and 'name_space'.
- *
- * Requires:
- *
- *\li  'client' is a valid client.
- *
- *\li  'name_space' is NULL or a valid name.
- *
- * Returns:
- *
- *\li  #ISC_R_SUCCESS                          On success.
- *
- *\li  Anything else                           Failure.
- */
-
 typedef void (*dns_client_resolve_cb)(dns_client_t     *client,
                                      const dns_name_t *name,
                                      dns_namelist_t   *namelist,
index 1733fdb232772292ca25c0e7b3d53099615d7d15..3a95e69605b025687a852f894f725e2cd3dc3126 100644 (file)
@@ -73,22 +73,6 @@ dns_fwdtable_add(dns_fwdtable_t *fwdtable, const dns_name_t *name,
  * \li #ISC_R_NOMEMORY
  */
 
-isc_result_t
-dns_fwdtable_delete(dns_fwdtable_t *fwdtable, const dns_name_t *name);
-/*%<
- * Removes an entry for 'name' from the forwarding table.  If an entry
- * that exactly matches 'name' does not exist, ISC_R_NOTFOUND will be returned.
- *
- * Requires:
- * \li fwdtable is a valid forwarding table.
- * \li name is a valid name
- *
- * Returns:
- * \li #ISC_R_SUCCESS
- * \li #ISC_R_NOTFOUND
- * \li #ISC_R_NOSPACE
- */
-
 isc_result_t
 dns_fwdtable_find(dns_fwdtable_t *fwdtable, const dns_name_t *name,
                  dns_name_t *foundname, dns_forwarders_t **forwardersp);