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
This commit is contained in:
parent
aa6dfe7103
commit
0d4ba7b58d
1
io.c
1
io.c
@ -1158,7 +1158,6 @@ io_fflush(rb_io_t *fptr)
|
|||||||
rb_io_check_closed(fptr);
|
rb_io_check_closed(fptr);
|
||||||
if (fptr->wbuf.len == 0)
|
if (fptr->wbuf.len == 0)
|
||||||
return 0;
|
return 0;
|
||||||
rb_io_check_closed(fptr);
|
|
||||||
while (fptr->wbuf.len > 0 && io_flush_buffer(fptr) != 0) {
|
while (fptr->wbuf.len > 0 && io_flush_buffer(fptr) != 0) {
|
||||||
if (!rb_io_wait_writable(fptr->fd))
|
if (!rb_io_wait_writable(fptr->fd))
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user