mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 08:38:38 +08:00
wchar/putwc: fix the putwc return value truncate error
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
parent
13cb355a4e
commit
390275f867
1 changed files with 3 additions and 2 deletions
|
@ -76,10 +76,11 @@ wint_t putwc_unlocked(wchar_t c, FAR FILE *f)
|
|||
|
||||
wint_t putwc(wchar_t c, FAR FILE *f)
|
||||
{
|
||||
wint_t wc;
|
||||
flockfile(f);
|
||||
c = putwc_unlocked(c, f);
|
||||
wc = putwc_unlocked(c, f);
|
||||
funlockfile(f);
|
||||
return c;
|
||||
return wc;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_FILE_STREAM */
|
||||
|
|
Loading…
Reference in a new issue