diff --git a/lib/roken/getaddrinfo.c b/lib/roken/getaddrinfo.c index 12a26a712..47affba59 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; + int ret = EAI_FAMILY; if (hints != NULL) family = hints->ai_family; @@ -216,7 +216,7 @@ get_null (const struct addrinfo *hints, ¤t, const_v4, &v4_addr, NULL); } *res = first; - return 0; + return ret; } static int