Re: svn commit: r297408 - head/lib/libc/stdio

2016-03-30 Thread Andrey Chernov
On 30.03.2016 9:13, Pedro F. Giffuni wrote: >*/ > + sverrno = 0; > if (file == NULL) { It introduces the bug of touching errno. Previous code does it right because 'goto finish;' can't happen with (f < 0) where errno is restored later. The whole errno code is complex here for re

Re: svn commit: r297408 - head/lib/libc/stdio

2016-03-30 Thread Bruce Evans
On Wed, 30 Mar 2016, Pedro F. Giffuni wrote: Log: freopen(3): prevent uninitialized errno. Revert r297407 and redo it cleanly. This might need a few more commits to do it correctly. Modified: head/lib/libc/stdio/freopen.c ===

svn commit: r297408 - head/lib/libc/stdio

2016-03-29 Thread Pedro F. Giffuni
Author: pfg Date: Wed Mar 30 06:13:58 2016 New Revision: 297408 URL: https://svnweb.freebsd.org/changeset/base/297408 Log: freopen(3): prevent uninitialized errno. Revert r297407 and redo it cleanly. Pointed out by: Jukka A. Ukkonen CID: 1018720 MFC after:1 week