summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-03-30 13:26:35 +0000
committerpfg <pfg@FreeBSD.org>2016-03-30 13:26:35 +0000
commit743d44200ec9374c72cd347b700bc811f99d04ac (patch)
treebbe4ef7b4b63c06c6e6eabd23ec00c1901d3d041
parent0d88b46e6fd97795a9850807c6bed0f90ecf1c26 (diff)
downloadFreeBSD-src-743d44200ec9374c72cd347b700bc811f99d04ac.zip
FreeBSD-src-743d44200ec9374c72cd347b700bc811f99d04ac.tar.gz
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
-rw-r--r--lib/libc/stdio/freopen.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/libc/stdio/freopen.c b/lib/libc/stdio/freopen.c
index 8138a6b..e0104c8 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) {
OpenPOWER on IntegriCloud