diff options
author | Samuel Williams <[email protected]> | 2022-05-09 22:36:33 +1200 |
---|---|---|
committer | Samuel Williams <[email protected]> | 2022-05-28 15:44:18 +1200 |
commit | 4efccd28e4b257fb1c8f97781d0b5b1c42c1d9fa (patch) | |
tree | d6864c3fb169bf4fc0dafd11cee42460f0dd69f4 /io.c | |
parent | ac499bb511e88faa1e9a8566c6fd4821abb17457 (diff) |
Improve consistency of `io_binwritev_internal` implementaiton.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5419
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1940,13 +1940,11 @@ io_binwritev_internal(VALUE arg) iov->iov_base = (char *)iov->iov_base + result; iov->iov_len -= result; - - errno = EAGAIN; } - - if (rb_io_maybe_wait_writable(errno, fptr->self, Qnil)) { + else if (rb_io_maybe_wait_writable(errno, fptr->self, Qnil)) { rb_io_check_closed(fptr); - } else { + } + else { return -1; } } |