summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-11-05 07:29:40 +0000
committerUlrich Drepper <drepper@redhat.com>2002-11-05 07:29:40 +0000
commit2fdeb7ca4f50e84886ddf8c8241e008c2808fe40 (patch)
tree35e38b9bd9f5d79f95731599f4de7fdd14cdf741 /libio
parent0f0d786f5f9b2a6c9b6449ae932b1ea7bdfe1f43 (diff)
downloadglibc-2fdeb7ca4f50e84886ddf8c8241e008c2808fe40.tar.gz
glibc-2fdeb7ca4f50e84886ddf8c8241e008c2808fe40.tar.xz
glibc-2fdeb7ca4f50e84886ddf8c8241e008c2808fe40.zip
(_IO_wfile_seekoff): Don't modify _offset and _wide_data->_IO_read_end if adjustment can be made in the current buffer.
Diffstat (limited to 'libio')
-rw-r--r--libio/wfileops.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libio/wfileops.c b/libio/wfileops.c
index 02933b730e..38f6ab256e 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -88,7 +88,7 @@ _IO_wdo_write (fp, data, to_do)
 	  if (_IO_new_do_write (fp, fp->_IO_write_base,
 				fp->_IO_write_ptr - fp->_IO_write_base) == EOF)
 	    /* Something went wrong.  */
-	    return EOF;
+	    return WEOF;
 
 	  to_do -= new_data - data;
 
@@ -682,12 +682,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
 		}
 	      while (read_ptr_copy != fp->_IO_read_ptr);
 
-	      fp->_offset = (fp->_offset
-			     - (fp->_IO_read_end - fp->_IO_read_base)
-			     + rel_offset);
-
-	      fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end
-		= fp->_wide_data->_IO_read_base;
+	      fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
 
 	      _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
 	      goto resync;