No need for mbstate_t to be static

This commit is contained in:
Kevin Ballard 2014-09-21 20:47:03 -07:00
parent e1f623f548
commit a027566295
2 changed files with 2 additions and 3 deletions

View file

@ -2605,8 +2605,7 @@ static int builtin_read(parser_t &parser, wchar_t **argv)
int finished=0; int finished=0;
wchar_t res=0; wchar_t res=0;
static mbstate_t state; mbstate_t state = {};
memset(&state, '\0', sizeof(state));
while (!finished) while (!finished)
{ {

View file

@ -243,7 +243,7 @@ wchar_t input_common_readch(int timed)
} }
wchar_t res; wchar_t res;
static mbstate_t state; mbstate_t state = {};
while (1) while (1)
{ {