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:
SPRESENSE 2020-11-27 19:46:07 +09:00 committed by Xiang Xiao
parent f7047d8ea3
commit d5f66e5583

View File

@ -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 */