aboutsummaryrefslogtreecommitdiff
path: root/lib/roken/getaddrinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/roken/getaddrinfo.c')
-rw-r--r--lib/roken/getaddrinfo.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/roken/getaddrinfo.c b/lib/roken/getaddrinfo.c
index ae21bf11090c..47affba59f51 100644
--- a/lib/roken/getaddrinfo.c
+++ b/lib/roken/getaddrinfo.c
@@ -188,7 +188,7 @@ get_null (const struct addrinfo *hints,
struct addrinfo *first = NULL;
struct addrinfo **current = &first;
int family = PF_UNSPEC;
- int ret = 0;
+ int ret = EAI_FAMILY;
if (hints != NULL)
family = hints->ai_family;
@@ -209,8 +209,6 @@ get_null (const struct addrinfo *hints,
if (family == PF_INET6 || family == PF_UNSPEC) {
ret = add_one (port, protocol, socktype,
&current, const_v6, &v6_addr, NULL);
- if (ret)
- return ret;
}
#endif
if (family == PF_INET || family == PF_UNSPEC) {
@@ -368,10 +366,10 @@ get_nodes (const char *nodename,
*/
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
-getaddrinfo(const char *nodename,
- const char *servname,
- const struct addrinfo *hints,
- struct addrinfo **res)
+rk_getaddrinfo(const char *nodename,
+ const char *servname,
+ const struct addrinfo *hints,
+ struct addrinfo **res)
{
int ret;
int port = 0;
@@ -411,6 +409,6 @@ getaddrinfo(const char *nodename,
ret = get_null (hints, port, protocol, socktype, res);
}
if (ret)
- freeaddrinfo (*res);
+ rk_freeaddrinfo(*res);
return ret;
}