aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-27 07:10:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-27 07:10:14 +0000
commitcc216f9aae241c2a4407a1d8253909b307df90bb (patch)
tree19d562d636600e0d8ab66133bd4584b8fbd1ad60 /io.c
parent057098bfdcdbdc5bbd26fb51a7f8a37e6f8a2547 (diff)
downloadruby-cc216f9aae241c2a4407a1d8253909b307df90bb.tar.gz
adjust indent and style
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/io.c b/io.c
index 58688e5dbc..599cbf24d4 100644
--- a/io.c
+++ b/io.c
@@ -264,9 +264,11 @@ rb_cloexec_open(const char *pathname, int flags, mode_t mode)
if (ret == -1) return -1;
if (ret <= 2 || o_cloexec_state == 0) {
rb_maygvl_fd_fix_cloexec(ret);
- } else if (o_cloexec_state > 0) {
+ }
+ else if (o_cloexec_state > 0) {
return ret;
- } else {
+ }
+ else {
o_cloexec_state = rb_fix_detect_o_cloexec(ret);
}
return ret;
@@ -1074,10 +1076,11 @@ io_flush_buffer_async2(VALUE arg)
/* pending async interrupt is there. */
errno = EAGAIN;
return -1;
- } else if (ret == 1) {
+ }
+ else if (ret == 1) {
return 0;
- } else
- return ret;
+ }
+ return ret;
}
static inline int
@@ -2716,7 +2719,8 @@ io_write_nonblock(VALUE io, VALUE str, int no_exception)
if (errno == EWOULDBLOCK || errno == EAGAIN) {
if (no_exception) {
return ID2SYM(rb_intern("wait_writable"));
- } else {
+ }
+ else {
rb_readwrite_sys_fail(RB_IO_WAIT_WRITABLE, "write would block");
}
}