From a64eec7e49bd552dbf3481591b07bcce1f4e0b66 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Mon, 10 Jun 2002 21:28:36 +0000 Subject: [PATCH] Added flushing of file streams. svn path=/trunk/; revision=3040 --- reactos/lib/msvcrt/sys_stat/fstat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/lib/msvcrt/sys_stat/fstat.c b/reactos/lib/msvcrt/sys_stat/fstat.c index e8c2c0baffe..8815866b7c4 100644 --- a/reactos/lib/msvcrt/sys_stat/fstat.c +++ b/reactos/lib/msvcrt/sys_stat/fstat.c @@ -1,4 +1,4 @@ -/* $Id: fstat.c,v 1.9 2002/05/07 22:31:26 hbirr Exp $ +/* $Id: fstat.c,v 1.10 2002/06/10 21:28:36 hbirr Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -34,6 +34,8 @@ int _fstat(int fd, struct stat *statbuf) return -1; } + fflush(NULL); + memset (statbuf, 0, sizeof(struct stat)); dwFileType = GetFileType(handle); @@ -95,6 +97,8 @@ __int64 _fstati64 (int fd, struct _stati64* statbuf) return -1; } + fflush(NULL); + memset(statbuf, 0, sizeof(struct _stati64)); dwFileType = GetFileType(handle);