[前][次][番号順一覧][スレッド一覧]

ruby-changes:71992

From: Samuel <ko1@a...>
Date: Sat, 28 May 2022 12:44:49 +0900 (JST)
Subject: [ruby-changes:71992] 4efccd28e4 (master): Improve consistency of `io_binwritev_internal` implementaiton.

https://git.ruby-lang.org/ruby.git/commit/?id=4efccd28e4

From 4efccd28e4b257fb1c8f97781d0b5b1c42c1d9fa Mon Sep 17 00:00:00 2001
From: Samuel Williams <samuel.williams@o...>
Date: Mon, 9 May 2022 22:36:33 +1200
Subject: Improve consistency of `io_binwritev_internal` implementaiton.

---
 io.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/io.c b/io.c
index c222dd5377..30fb42d932 100644
--- a/io.c
+++ b/io.c
@@ -1940,13 +1940,11 @@ io_binwritev_internal(VALUE arg) https://github.com/ruby/ruby/blob/trunk/io.c#L1940
 
             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;
         }
     }
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]