diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-02 08:30:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-02 08:30:57 +0000 |
commit | 49e801c1c77a898469b74b5f63d54665386119cf (patch) | |
tree | 4a28f30ad852cd289b2b5d7171722ae7aa5746dc /io.c | |
parent | 80477c1dff8056b392137a280c8cbc549e9c7c00 (diff) |
io.c: unused assignments
* io.c (fptr_finalize_flush): removed unused assignments. if
noraise, err is never used after set.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -4523,8 +4523,7 @@ fptr_finalize_flush(rb_io_t *fptr, int noraise, int keepgvl) } if (fptr->wbuf.len) { if (noraise) { - if ((int)io_flush_buffer_sync(fptr) < 0 && NIL_P(err)) - err = Qtrue; + io_flush_buffer_sync(fptr); } else { if (io_fflush(fptr) < 0 && NIL_P(err)) @@ -4543,7 +4542,7 @@ fptr_finalize_flush(rb_io_t *fptr, int noraise, int keepgvl) /* stdio_file is deallocated anyway * even if fclose failed. */ if ((maygvl_fclose(stdio_file, noraise) < 0) && NIL_P(err)) - err = noraise ? Qtrue : INT2NUM(errno); + if (!noraise) err = INT2NUM(errno); } else if (0 <= fd) { /* fptr->fd may be closed even if close fails. @@ -4554,7 +4553,7 @@ fptr_finalize_flush(rb_io_t *fptr, int noraise, int keepgvl) keepgvl |= !(mode & FMODE_WRITABLE); keepgvl |= noraise; if ((maygvl_close(fd, keepgvl) < 0) && NIL_P(err)) - err = noraise ? Qtrue : INT2NUM(errno); + if (!noraise) err = INT2NUM(errno); } if (!NIL_P(err) && !noraise) { |