about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-14 15:59:54 +0100
committerPetr Baudis <pasky@ucw.cz>2011-05-27 01:32:18 +0200
commit875703d0957adb972d542cfd174dba9bb95e8321 (patch)
tree3cc6e2599c1b0fa14d7c60e043a569b43c5935ac
parent88a97c6e4cedbd71e05008dab220922894ef66da (diff)
downloadglibc-875703d0957adb972d542cfd174dba9bb95e8321.tar.gz
glibc-875703d0957adb972d542cfd174dba9bb95e8321.tar.xz
glibc-875703d0957adb972d542cfd174dba9bb95e8321.zip
Initialize variable in _IO_new_file_close_it
The last change left a variable in some situations uninitialized.

(cherry picked from commit ca408c157c71edebf45862c35738eb2614cbcd77)
-rw-r--r--ChangeLog5
-rw-r--r--libio/fileops.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f05f09114..8fcbbbb780 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,10 @@
 2011-05-14  Ulrich Drepper  <drepper@gmail.com>
 
+	* libio/fileops.c (_IO_new_file_close_it): Initialize write_status.
+
 	* iconv/loop.c (SINGLE) [STORE_REST]: Add input bytes to bytebuf before
-	storing incomplete byte sequence in state object.
+	storing incomplete byte sequence in state object.  Avoid testing for
+	guaranteed too small input if we know there is enough data available.
 
 2011-05-13  Ulrich Drepper  <drepper@gmail.com>
 
diff --git a/libio/fileops.c b/libio/fileops.c
index adf4cfaea9..66c17dfbec 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -175,6 +175,8 @@ _IO_new_file_close_it (fp)
       else
 	write_status = _IO_SYSSEEK (fp, o, SEEK_SET) < 0 ? EOF : 0;
     }
+  else
+    write_status = 0;
 
   INTUSE(_IO_unsave_markers) (fp);