summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
40b2b5f)
there is no need to zero-fill an mbstate_t object in the caller;
mbsrtowcs will automatically treat a null pointer as the initial
state.
size_t mbstowcs(wchar_t *restrict ws, const char *restrict s, size_t wn)
{
size_t mbstowcs(wchar_t *restrict ws, const char *restrict s, size_t wn)
{
- mbstate_t st = { 0 };
- return mbsrtowcs(ws, (void*)&s, wn, &st);
+ return mbsrtowcs(ws, (void*)&s, wn, 0);