diff options
Diffstat (limited to 'StdLib/LibC/Stdio/clrerr.c')
-rw-r--r-- | StdLib/LibC/Stdio/clrerr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/StdLib/LibC/Stdio/clrerr.c b/StdLib/LibC/Stdio/clrerr.c index bda0d04ce8..469dc8c96a 100644 --- a/StdLib/LibC/Stdio/clrerr.c +++ b/StdLib/LibC/Stdio/clrerr.c @@ -1,7 +1,7 @@ /** @file
Implementation of clearerr as declared in <stdio.h>.
- Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License that accompanies this
distribution. The full text of the license may be found at
@@ -47,6 +47,7 @@ #include <assert.h>
#include <stdio.h>
+#include <errno.h>
#include "reentrant.h"
#include "local.h"
@@ -55,9 +56,10 @@ void
clearerr(FILE *fp)
{
- //_DIAGASSERT(fp != NULL);
-
+ _DIAGASSERT(fp != NULL);
+ if(fp != NULL) {
FLOCKFILE(fp);
__sclearerr(fp);
FUNLOCKFILE(fp);
+ }
}
|