stdio/lib_clearerr: Did not clear stream buffer flags in clearerr
Stream buffer flags has a dependency with allocated buffer, and it cannot clear without buffer operation. Change clearerr to keep buffer flags to prevent unexpected buffer operation.
This commit is contained in:
parent
f7047d8ea3
commit
d5f66e5583
1 changed files with 1 additions and 1 deletions
|
|
@ -48,6 +48,6 @@
|
|||
|
||||
void clearerr(FAR FILE *stream)
|
||||
{
|
||||
stream->fs_flags = 0;
|
||||
stream->fs_flags &= (__FS_FLAG_LBF | __FS_FLAG_UBF);
|
||||
}
|
||||
#endif /* CONFIG_FILE_STREAM */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue