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:
parent
b0a665d947
commit
ecb74bae0d
@ -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:
|
||||
|
@ -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);
|
||||
/*%<
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user