2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

dns/resolver.c: Return void when ISC_R_SUCCESS is only returned value

With isc_mem_get() and dns_name_dup() no longer being able to fail, some
functions can now only return ISC_R_SUCCESS.  Change the return type to
void for the following function(s):

 * dns_resolver_addalternate()
This commit is contained in:
Ondřej Surý 2021-10-06 12:59:45 +02:00
parent b0a665d947
commit ecb74bae0d
3 changed files with 5 additions and 7 deletions

View File

@ -6074,8 +6074,8 @@ configure_alternates(const cfg_obj_t *config, dns_view_t *view,
}
myport = (in_port_t)val;
}
CHECK(dns_resolver_addalternate(view->resolver, NULL,
name, myport));
dns_resolver_addalternate(view->resolver, NULL, name,
myport);
continue;
}
@ -6083,7 +6083,7 @@ configure_alternates(const cfg_obj_t *config, dns_view_t *view,
if (isc_sockaddr_getport(&sa) == 0) {
isc_sockaddr_setport(&sa, port);
}
CHECK(dns_resolver_addalternate(view->resolver, &sa, NULL, 0));
dns_resolver_addalternate(view->resolver, &sa, NULL, 0);
}
cleanup:

View File

@ -434,7 +434,7 @@ dns_resolver_setlamettl(dns_resolver_t *resolver, uint32_t lame_ttl);
*\li 'resolver' to be valid.
*/
isc_result_t
void
dns_resolver_addalternate(dns_resolver_t *resolver, const isc_sockaddr_t *alt,
const dns_name_t *name, in_port_t port);
/*%<

View File

@ -10708,7 +10708,7 @@ dns_resolver_setlamettl(dns_resolver_t *resolver, uint32_t lame_ttl) {
resolver->lame_ttl = lame_ttl;
}
isc_result_t
void
dns_resolver_addalternate(dns_resolver_t *resolver, const isc_sockaddr_t *alt,
const dns_name_t *name, in_port_t port) {
alternate_t *a;
@ -10729,8 +10729,6 @@ dns_resolver_addalternate(dns_resolver_t *resolver, const isc_sockaddr_t *alt,
}
ISC_LINK_INIT(a, link);
ISC_LIST_APPEND(resolver->alternates, a, link);
return (ISC_R_SUCCESS);
}
void