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