From 875703d0957adb972d542cfd174dba9bb95e8321 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 14 May 2011 15:59:54 +0100 Subject: Initialize variable in _IO_new_file_close_it The last change left a variable in some situations uninitialized. (cherry picked from commit ca408c157c71edebf45862c35738eb2614cbcd77) --- ChangeLog | 5 ++++- libio/fileops.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3f05f09114..8fcbbbb780 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,10 @@ 2011-05-14 Ulrich Drepper + * 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 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); -- cgit 1.4.1