summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2003-01-03 12:27:19 +0000
committertjr <tjr@FreeBSD.org>2003-01-03 12:27:19 +0000
commitc1a0e9934fed2099c07ed04436fb716d04bb8fa1 (patch)
tree3ff878fea37d8ddda547434af80b68400d0efc49 /lib/libc
parent89dea00d7bd464dfe08497b4fcae02d21413ba12 (diff)
downloadFreeBSD-src-c1a0e9934fed2099c07ed04436fb716d04bb8fa1.zip
FreeBSD-src-c1a0e9934fed2099c07ed04436fb716d04bb8fa1.tar.gz
Reset the stream orientation to 0 (unoriented) in freopen(), as required
by the C standard.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/freopen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/stdio/freopen.c b/lib/libc/stdio/freopen.c
index b445b15..a22dedd 100644
--- a/lib/libc/stdio/freopen.c
+++ b/lib/libc/stdio/freopen.c
@@ -133,6 +133,7 @@ freopen(file, mode, fp)
if (HASLB(fp))
FREELB(fp);
fp->_lb._size = 0;
+ fp->_extra->orientation = 0;
if (f < 0) { /* did not get it after all */
fp->_flags = 0; /* set it free */
OpenPOWER on IntegriCloud