aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-02-26 13:20:43 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-02-26 13:20:43 +0900
commitef00c6da884499c8fab8531a3780e547e87c04fa (patch)
tree3a916b0415e1a3bebabb8ebc983bef3d37588ed2 /io.c
parent672b81b090fb346b71f1c8e87a51a7c33f239df4 (diff)
downloadruby-ef00c6da884499c8fab8531a3780e547e87c04fa.tar.gz
Adjust `else` style to be consistent in each files [ci skip]
Diffstat (limited to 'io.c')
-rw-r--r--io.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/io.c b/io.c
index 7b5c707884..76353cb6e0 100644
--- a/io.c
+++ b/io.c
@@ -1151,7 +1151,8 @@ io_internal_wait(VALUE thread, rb_io_t *fptr, int error, int events, struct time
if (ready > 0) {
return ready;
- } else if (ready == 0) {
+ }
+ else if (ready == 0) {
errno = ETIMEDOUT;
return -1;
}
@@ -1179,7 +1180,8 @@ internal_read_func(void *ptr)
if (io_again_p(errno)) {
if (io_internal_wait(iis->th, iis->fptr, errno, RB_WAITFD_IN, iis->timeout) == -1) {
return -1;
- } else {
+ }
+ else {
goto retry;
}
}
@@ -1214,7 +1216,8 @@ internal_write_func(void *ptr)
if (io_again_p(e)) {
if (io_internal_wait(iis->th, iis->fptr, errno, RB_WAITFD_OUT, iis->timeout) == -1) {
return -1;
- } else {
+ }
+ else {
goto retry;
}
}
@@ -1243,7 +1246,8 @@ internal_writev_func(void *ptr)
if (io_again_p(errno)) {
if (io_internal_wait(iis->th, iis->fptr, errno, RB_WAITFD_OUT, iis->timeout) == -1) {
return -1;
- } else {
+ }
+ else {
goto retry;
}
}