diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-08-29 22:41:42 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-08-29 22:41:42 +0000 |
commit | 076bfcf612a1f774b214e335184d010b60bfad40 (patch) | |
tree | 1b165613e8f1bae3cc7ccd96407a88378283fbec /libio/fileops.c | |
parent | c7c3b0e907efac218b329ebbe3fc7432ec4415c5 (diff) | |
download | glibc-076bfcf612a1f774b214e335184d010b60bfad40.tar glibc-076bfcf612a1f774b214e335184d010b60bfad40.tar.gz glibc-076bfcf612a1f774b214e335184d010b60bfad40.tar.bz2 glibc-076bfcf612a1f774b214e335184d010b60bfad40.zip |
Update.
2000-08-29 Ulrich Drepper <drepper@redhat.com>
* libio/iogetline.c: Set mode before the loop in case n==0.
* libio/iogetwline.c: Likewise.
2000-08-29 H.J. Lu <hjl@gnu.org>
* libio/fileops.c (new_do_write): Check fp->_mode <= 0 instead
of fp->_mode < 0.
(_IO_new_file_overflow): Likewise.
* libio/genops.c (_IO_flush_all): Likewise.
* libio/ioftell.c (_IO_ftell): Likewise.
Diffstat (limited to 'libio/fileops.c')
-rw-r--r-- | libio/fileops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libio/fileops.c b/libio/fileops.c index a830b5cd43..9f550dd70d 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -411,7 +411,7 @@ new_do_write (fp, data, to_do) fp->_cur_column = _IO_adjust_column (fp->_cur_column - 1, data, count) + 1; _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base); fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_buf_base; - fp->_IO_write_end = (fp->_mode < 0 + fp->_IO_write_end = (fp->_mode <= 0 && (fp->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED)) ? fp->_IO_buf_base : fp->_IO_buf_end); return count; @@ -516,7 +516,7 @@ _IO_new_file_overflow (f, ch) f->_IO_read_base = f->_IO_read_ptr = f->_IO_read_end; f->_flags |= _IO_CURRENTLY_PUTTING; - if (f->_mode < 0 && f->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED)) + if (f->_mode <= 0 && f->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED)) f->_IO_write_end = f->_IO_write_ptr; } if (ch == EOF) |