From 743d44200ec9374c72cd347b700bc811f99d04ac Mon Sep 17 00:00:00 2001 From: pfg Date: Wed, 30 Mar 2016 13:26:35 +0000 Subject: [PATCH] freopen(3): prevent uninitialized errno. Revert completley r297408 (and r297407): this ends up touching errno, which we are not allowed to do. Pointed out by: ache, bde --- lib/libc/stdio/freopen.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libc/stdio/freopen.c b/lib/libc/stdio/freopen.c index 8138a6b2885e..e0104c88eef6 100644 --- a/lib/libc/stdio/freopen.c +++ b/lib/libc/stdio/freopen.c @@ -78,7 +78,6 @@ freopen(const char * __restrict file, const char * __restrict mode, * re-open the same file with a different mode. We allow this only * if the modes are compatible. */ - sverrno = 0; if (file == NULL) { /* See comment below regarding freopen() of closed files. */ if (fp->_flags == 0) {