libc/stdio: lib_fwrite_unlocked must call lib_fflush_unlocked with true

otherwise the following file i/o mess up the output

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-10-22 04:51:59 +08:00 committed by Petro Karashchenko
parent 468e9fcde5
commit c3be772441
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ ssize_t lib_fwrite_unlocked(FAR const void *ptr, size_t count,
{
/* Flush the buffered data to the IO stream */
int bytes_buffered = lib_fflush_unlocked(stream, false);
int bytes_buffered = lib_fflush_unlocked(stream, true);
if (bytes_buffered < 0)
{
goto errout;