* lib/mbrtowc.c (mbrtowc): Delay pstate assignment until it is needed.
+2011-02-20 Bruno Haible <bruno@clisp.org>
+
+ mbrtowc: Tiny optimization.
+ * lib/mbrtowc.c (mbrtowc): Delay pstate assignment until it is needed.
+
2011-02-20 Jim Meyering <meyering@redhat.com>
test-exclude.c: remove unmatched #endif
{
char *pstate = (char *)ps;
- if (pstate == NULL)
- pstate = internal_state;
-
if (s == NULL)
{
pwc = NULL;
return (size_t)(-2);
/* Here n > 0. */
+
+ if (pstate == NULL)
+ pstate = internal_state;
+
{
size_t nstate = pstate[0];
char buf[4];