diff options
| author | Jason Evans <jasone@FreeBSD.org> | 2000-01-12 09:23:48 +0000 | 
|---|---|---|
| committer | Jason Evans <jasone@FreeBSD.org> | 2000-01-12 09:23:48 +0000 | 
| commit | 929273386f6e688c008b15fd24932df2ed7e7172 (patch) | |
| tree | b3edfb3b0b6bdadce3b9cf019cabf1218f08038d /lib/libc/stdio/freopen.c | |
| parent | f3d5d34b459fcd295a618227c37e2bacae1cdf67 (diff) | |
Notes
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 9de6724f0ed8..39399f3b907a 100644 --- a/lib/libc/stdio/freopen.c +++ b/lib/libc/stdio/freopen.c @@ -100,13 +100,13 @@ freopen(file, mode, fp)  	}  	/* Get a new descriptor to refer to the new file. */ -	f = open(file, oflags, DEFFILEMODE); +	f = _libc_open(file, oflags, DEFFILEMODE);  	if (f < 0 && isopen) {  		/* If out of fd's close the old one and try again. */  		if (errno == ENFILE || errno == EMFILE) {  			(void) (*fp->_close)(fp->_cookie);  			isopen = 0; -			f = open(file, oflags, DEFFILEMODE); +			f = _libc_open(file, oflags, DEFFILEMODE);  		}  	}  	sverrno = errno; @@ -147,7 +147,7 @@ freopen(file, mode, fp)  	 */  	if (wantfd >= 0 && f != wantfd) {  		if (dup2(f, wantfd) >= 0) { -			(void) close(f); +			(void)_libc_close(f);  			f = wantfd;  		}  	}  | 
