summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/setvbuf.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-09-03 02:35:10 +0000
committerache <ache@FreeBSD.org>2001-09-03 02:35:10 +0000
commit2a55bd67ec52effee36845992d22f9b582718da6 (patch)
treecfb3107fbc4dd87a435ccc42a87f4089d4ea3761 /lib/libc/stdio/setvbuf.c
parentcbe865cf8c86d5f4b1c19485a2cd4ff56834b78f (diff)
downloadFreeBSD-src-2a55bd67ec52effee36845992d22f9b582718da6.zip
FreeBSD-src-2a55bd67ec52effee36845992d22f9b582718da6.tar.gz
When __SOPT is cleared, clear __SOFF too.
NOTE: original stdio bug.
Diffstat (limited to 'lib/libc/stdio/setvbuf.c')
-rw-r--r--lib/libc/stdio/setvbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdio/setvbuf.c b/lib/libc/stdio/setvbuf.c
index f25391f..c2179ca 100644
--- a/lib/libc/stdio/setvbuf.c
+++ b/lib/libc/stdio/setvbuf.c
@@ -88,7 +88,7 @@ setvbuf(fp, buf, mode, size)
flags = fp->_flags;
if (flags & __SMBF)
free((void *)fp->_bf._base);
- flags &= ~(__SLBF | __SNBF | __SMBF | __SOPT | __SNPT | __SEOF);
+ flags &= ~(__SLBF | __SNBF | __SMBF | __SOPT | __SOFF | __SNPT | __SEOF);
/* If setting unbuffered mode, skip all the hard work. */
if (mode == _IONBF)
OpenPOWER on IntegriCloud