summaryrefslogtreecommitdiff
path: root/ext/socket/getaddrinfo.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 08:21:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 08:21:01 +0000
commitd0e5a34ac7c34e70c145024a0fed8f6042814f29 (patch)
tree8a7edcfded4a6fe70c18cb33c65868baf9268573 /ext/socket/getaddrinfo.c
parent3e8d63059d36fe6ba64ffba7bfce577693c98b59 (diff)
* ext/**/*.[ch]: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 a4f01c0..3382f00 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