Fix a bug introduced in r187302 that was causing fputws() to enter an

infinite loop pretty much unconditionally.  It's remarkable that the
patch that introduced the bug was never tested, but even more
remarkable that nobody noticed for over two years.

PR:		167039
MFC after:	3 days
This commit is contained in:
David Schultz 2012-04-21 06:08:02 +00:00
parent 1d0e8a50a0
commit 177628ce75

View file

@ -70,7 +70,7 @@ fputws_l(const wchar_t * __restrict ws, FILE * __restrict fp, locale_t locale)
iov.iov_len = uio.uio_resid = nbytes;
if (__sfvwrite(fp, &uio) != 0)
goto error;
} while (ws != NULL);
} while (wsp != NULL);
FUNLOCKFILE(fp);
return (0);