diff options
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/testmb.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/stdlib/testmb.c b/stdlib/testmb.c index 117ade1a5b..45dae7db61 100644 --- a/stdlib/testmb.c +++ b/stdlib/testmb.c @@ -40,11 +40,7 @@ main (int argc, char *argv[]) int r; char c = 'x'; wchar_t wc; - char *mbc; - - mbc = (char *) malloc (MB_CUR_MAX); - mbc[0] = c; - mbc[1] = '\0'; + char mbc[MB_CUR_MAX]; if ((r = mbtowc (&wc, &c, MB_CUR_MAX)) <= 0) { |