diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-27 07:10:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-27 07:10:14 +0000 |
commit | cc216f9aae241c2a4407a1d8253909b307df90bb (patch) | |
tree | 19d562d636600e0d8ab66133bd4584b8fbd1ad60 /io.c | |
parent | 057098bfdcdbdc5bbd26fb51a7f8a37e6f8a2547 (diff) | |
download | ruby-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.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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"); } } |