]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Initialize variable in _IO_new_file_close_it
authorUlrich Drepper <drepper@gmail.com>
Sat, 14 May 2011 14:59:54 +0000 (15:59 +0100)
committerPetr Baudis <pasky@ucw.cz>
Thu, 26 May 2011 23:32:18 +0000 (01:32 +0200)
The last change left a variable in some situations uninitialized.

(cherry picked from commit ca408c157c71edebf45862c35738eb2614cbcd77)

ChangeLog
libio/fileops.c

index 3f05f091144ea8a19bce5201c8dd0c062f5d820f..8fcbbbb780d4ccf021051d1d1300ef1b9c32b473 100644 (file)
--- 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>
 
index adf4cfaea953d8c69203f1241e4fb6c295cc9b93..66c17dfbec290ea49b6ddb997c21b5ca2a9f7b46 100644 (file)
@@ -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);