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 ===