1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Adjust indents [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2020-08-27 23:39:15 +09:00
parent b8bfb1d5f5
commit 96d701f737
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
2 changed files with 14 additions and 14 deletions

View file

@ -369,15 +369,15 @@ rb_getaddrinfo_a(const char *node, const char *service,
arg.timeout = timeout;
ret = (int)(VALUE)rb_thread_call_without_gvl(nogvl_gai_suspend, &arg, RUBY_UBF_IO, 0);
if (ret && ret != EAI_ALLDONE) {
/* EAI_ALLDONE indicates that the request already completed and gai_suspend was redundant */
/* on Ubuntu 18.04 (or other systems), gai_suspend(3) returns EAI_SYSTEM/ENOENT on timeout */
if (ret == EAI_SYSTEM && errno == ENOENT) {
return EAI_AGAIN;
} else {
return ret;
if (ret && ret != EAI_ALLDONE) {
/* EAI_ALLDONE indicates that the request already completed and gai_suspend was redundant */
/* on Ubuntu 18.04 (or other systems), gai_suspend(3) returns EAI_SYSTEM/ENOENT on timeout */
if (ret == EAI_SYSTEM && errno == ENOENT) {
return EAI_AGAIN;
} else {
return ret;
}
}
}
ret = gai_error(reqs[0]);
@ -943,7 +943,7 @@ call_getaddrinfo(VALUE node, VALUE service,
}
#ifdef HAVE_GETADDRINFO_A
res = rsock_getaddrinfo_a(node, service, &hints, socktype_hack, timeout);
res = rsock_getaddrinfo_a(node, service, &hints, socktype_hack, timeout);
#else
res = rsock_getaddrinfo(node, service, &hints, socktype_hack);
#endif

View file

@ -1182,11 +1182,11 @@ sock_s_getaddrinfo(int argc, VALUE *argv, VALUE _)
norevlookup = rsock_do_not_reverse_lookup;
}
#ifdef HAVE_GETADDRINFO_A
res = rsock_getaddrinfo_a(host, port, &hints, 0, Qnil);
#else
res = rsock_getaddrinfo(host, port, &hints, 0);
#endif
#ifdef HAVE_GETADDRINFO_A
res = rsock_getaddrinfo_a(host, port, &hints, 0, Qnil);
#else
res = rsock_getaddrinfo(host, port, &hints, 0);
#endif
ret = make_addrinfo(res, norevlookup);
rb_freeaddrinfo(res);