From f326a706f8ef9f539bf44312ef8c6c5baa2a0ebe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 29 Apr 1998 09:12:43 +0000 Subject: Update. 1998-04-29 Ulrich Drepper * stdio-common/vfprintf.c [%S]: Don't clear mbstate twice; wcsrtombs must put it into initial state. --- stdio-common/vfprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stdio-common') diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index d8d0f87b0f..dcc5cdbdaa 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -887,9 +887,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) /* Illegal wide-character string. */ \ return -1; \ \ + assert (__mbsinit (&mbstate)); \ s2 = (const wchar_t *) string; \ string = alloca (len + 1); \ - memset (&mbstate, '\0', sizeof (mbstate_t)); \ (void) __wcsrtombs (string, &s2, prec != -1 ? prec : UINT_MAX, \ &mbstate); \ } \ -- cgit v1.2.3