ruby-changes:62726
From: Nobuyoshi <ko1@a...>
Date: Thu, 27 Aug 2020 23:39:32 +0900 (JST)
Subject: [ruby-changes:62726] 96d701f737 (master): Adjust indents [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=96d701f737 From 96d701f73780638ffd3c8fa91c43f33f1a207d65 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 27 Aug 2020 23:39:15 +0900 Subject: Adjust indents [ci skip] diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index b601b1b..4dd2867 100644 --- a/ext/socket/raddrinfo.c +++ b/ext/socket/raddrinfo.c @@ -369,15 +369,15 @@ rb_getaddrinfo_a(const char *node, const char *service, https://github.com/ruby/ruby/blob/trunk/ext/socket/raddrinfo.c#L369 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, https://github.com/ruby/ruby/blob/trunk/ext/socket/raddrinfo.c#L943 } #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 diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 3212467..edf5f00 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -1182,11 +1182,11 @@ sock_s_getaddrinfo(int argc, VALUE *argv, VALUE _) https://github.com/ruby/ruby/blob/trunk/ext/socket/socket.c#L1182 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); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/