diff options
Diffstat (limited to 'lib/libc/stdio/freopen.c')
-rw-r--r-- | lib/libc/stdio/freopen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdio/freopen.c b/lib/libc/stdio/freopen.c index 85d3ed2646f..e5e0b53e84b 100644 --- a/lib/libc/stdio/freopen.c +++ b/lib/libc/stdio/freopen.c @@ -1,4 +1,4 @@ -/* $NetBSD: freopen.c,v 1.4 1995/02/02 02:09:36 jtc Exp $ */ +/* $NetBSD: freopen.c,v 1.5 1996/05/04 19:25:19 mycroft Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)freopen.c 8.1 (Berkeley) 6/4/93"; #endif -static char rcsid[] = "$NetBSD: freopen.c,v 1.4 1995/02/02 02:09:36 jtc Exp $"; +static char rcsid[] = "$NetBSD: freopen.c,v 1.5 1996/05/04 19:25:19 mycroft Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -114,7 +114,7 @@ freopen(file, mode, fp) * keep fp->_base: it may be the wrong size. This loses the effect * of any setbuffer calls, but stdio has always done this before. */ - if (isopen) + if (isopen && f != wantfd) (void) (*fp->_close)(fp->_cookie); if (fp->_flags & __SMBF) free((char *)fp->_bf._base); |