From c79e062121fd6ca39ee9ca6ad53f295117b512a2 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 12 Jun 1987 19:10:12 +0000 Subject: [PATCH] fixed bug --- lang/cem/libcc/stdio/freopen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/cem/libcc/stdio/freopen.c b/lang/cem/libcc/stdio/freopen.c index 85d22152..81f233f4 100644 --- a/lang/cem/libcc/stdio/freopen.c +++ b/lang/cem/libcc/stdio/freopen.c @@ -8,11 +8,11 @@ FILE *freopen(name,mode,fp) char *name , *mode; FILE *fp; { - FILE *fp; char *malloc(); int fd, flags = 0; + fflush(fp); close(fileno(fp)); if (io_testflag(fp, IO_MYBUF) && fp->_buf) free(fp->_buf);