mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-11 12:50:58 +08:00
Update.
* libio/wfileops.c (_IO_wdo_write): Correct return value.
This commit is contained in:
parent
9494452cd4
commit
11fd973a1f
@ -1,5 +1,7 @@
|
|||||||
2000-07-25 Ulrich Drepper <drepper@redhat.com>
|
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
|
* libio/wfileops.c (_IO_wdo_write): Allow partial conversions in the
|
||||||
loop.
|
loop.
|
||||||
|
|
||||||
|
@ -60,7 +60,6 @@ _IO_wdo_write (fp, data, to_do)
|
|||||||
_IO_size_t to_do;
|
_IO_size_t to_do;
|
||||||
{
|
{
|
||||||
struct _IO_codecvt *cc = &fp->_wide_data->_codecvt;
|
struct _IO_codecvt *cc = &fp->_wide_data->_codecvt;
|
||||||
_IO_size_t count = 0;
|
|
||||||
|
|
||||||
if (to_do > 0)
|
if (to_do > 0)
|
||||||
{
|
{
|
||||||
@ -90,7 +89,6 @@ _IO_wdo_write (fp, data, to_do)
|
|||||||
/* Something went wrong. */
|
/* Something went wrong. */
|
||||||
return EOF;
|
return EOF;
|
||||||
|
|
||||||
count += new_data - data;
|
|
||||||
to_do -= new_data - data;
|
to_do -= new_data - data;
|
||||||
|
|
||||||
/* Next see whether we had problems during the conversion. If yes,
|
/* Next see whether we had problems during the conversion. If yes,
|
||||||
@ -112,7 +110,7 @@ _IO_wdo_write (fp, data, to_do)
|
|||||||
? fp->_wide_data->_IO_buf_base
|
? fp->_wide_data->_IO_buf_base
|
||||||
: fp->_wide_data->_IO_buf_end);
|
: fp->_wide_data->_IO_buf_end);
|
||||||
|
|
||||||
return count;
|
return to_do == 0 ? 0 : WEOF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user