summaryrefslogtreecommitdiff
path: root/ext/socket/getaddrinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/getaddrinfo.c')
-rw-r--r--ext/socket/getaddrinfo.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index a4f01c0405..3382f00e52 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -114,7 +114,7 @@ static const struct afd {
int a_socklen;
int a_off;
const char *a_addrany;
- const char *a_loopback;
+ const char *a_loopback;
} afdl [] = {
#ifdef INET6
#define N_INET6 0
@@ -145,7 +145,7 @@ static int get_name __P((const char *, const struct afd *,
static int get_addr __P((const char *, int, struct addrinfo **,
struct addrinfo *, int));
static int str_isnumber __P((const char *));
-
+
static const char *const ai_errlist[] = {
"success.",
"address family for hostname not supported.", /* EAI_ADDRFAMILY */
@@ -302,7 +302,7 @@ getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *h
pai->ai_addr = NULL;
pai->ai_next = NULL;
port = ANY;
-
+
if (hostname == NULL && servname == NULL)
return EAI_NONAME;
if (hints) {
@@ -409,7 +409,7 @@ getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *h
ERR(EAI_PROTOCOL); /*xxx*/
}
}
-
+
/*
* hostname == NULL.
* passive socket -> anyaddr (0.0.0.0 or ::)
@@ -458,7 +458,7 @@ getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *h
else
ERR(EAI_FAMILY);
}
-
+
/* hostname as numeric name */
for (i = 0; afdl[i].a_af; i++) {
if (inet_pton(afdl[i].a_af, hostname, pton)) {
@@ -484,7 +484,7 @@ getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *h
break;
#endif
}
-
+
if (pai->ai_family == afdl[i].a_af ||
pai->ai_family == PF_UNSPEC) {
if (! (pai->ai_flags & AI_CANONNAME)) {
@@ -549,7 +549,7 @@ get_name(const char *addr, const struct afd *afd, struct addrinfo **res, char *n
GET_CANONNAME(cur, hp->h_name);
} else
GET_AI(cur, afd, numaddr, port);
-
+
#ifdef INET6
if (hp)
freehostent(hp);
@@ -612,7 +612,7 @@ get_addr(const char *hostname, int af, struct addrinfo **res, struct addrinfo *p
if ((hp->h_name == NULL) || (hp->h_name[0] == 0) ||
(hp->h_addr_list[0] == NULL))
ERR(EAI_FAIL);
-
+
for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) {
switch (af) {
#ifdef INET6