summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-06 10:41:07 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-06 10:41:07 (GMT)
commit0d4ba7b58d49576a4cea4892cd272a6b0df81163 (patch)
treedd5c1652cfa1f9305998b3d5e96dd79c9d274fa6 /io.c
parentaa6dfe71039c2b74b5fecd469efb57d5e3ccbe45 (diff)
io.c (io_fflush): eliminate redundant rb_io_check_closed
There is no need to call this function twice in a row since thread switching won't happen in-between calls to it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/io.c b/io.c
index 442bf52..24dacc5 100644
--- a/io.c
+++ b/io.c
@@ -1158,7 +1158,6 @@ io_fflush(rb_io_t *fptr)
rb_io_check_closed(fptr);
if (fptr->wbuf.len == 0)
return 0;
- rb_io_check_closed(fptr);
while (fptr->wbuf.len > 0 && io_flush_buffer(fptr) != 0) {
if (!rb_io_wait_writable(fptr->fd))
return -1;