* libio/wfileops.c (_IO_wdo_write): Correct return value.
2000-07-25 Ulrich Drepper <drepper@redhat.com>
+ * libio/wfileops.c (_IO_wdo_write): Correct return value.
+
* libio/wfileops.c (_IO_wdo_write): Allow partial conversions in the
loop.
_IO_size_t to_do;
{
struct _IO_codecvt *cc = &fp->_wide_data->_codecvt;
- _IO_size_t count = 0;
if (to_do > 0)
{
/* Something went wrong. */
return EOF;
- count += new_data - data;
to_do -= new_data - data;
/* Next see whether we had problems during the conversion. If yes,
? fp->_wide_data->_IO_buf_base
: fp->_wide_data->_IO_buf_end);
- return count;
+ return to_do == 0 ? 0 : WEOF;
}