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
@ -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 putwc(wchar_t c, FAR FILE *f)
|
||||||
{
|
{
|
||||||
|
wint_t wc;
|
||||||
flockfile(f);
|
flockfile(f);
|
||||||
c = putwc_unlocked(c, f);
|
wc = putwc_unlocked(c, f);
|
||||||
funlockfile(f);
|
funlockfile(f);
|
||||||
return c;
|
return wc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_FILE_STREAM */
|
#endif /* CONFIG_FILE_STREAM */
|
||||||
|
Loading…
Reference in New Issue
Block a user