aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-25 09:08:50 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-25 09:08:50 +0000
commit11fd973a1f9e5321580c35d13e9ba25217a003e8 (patch)
treeb07f359f43e04f632c75657b9e398febe74bd6e5
parent9494452cd4a6423f43a22d537da1f9d99e211e34 (diff)
downloadglibc-11fd973a1f9e5321580c35d13e9ba25217a003e8.tar
glibc-11fd973a1f9e5321580c35d13e9ba25217a003e8.tar.gz
glibc-11fd973a1f9e5321580c35d13e9ba25217a003e8.tar.bz2
glibc-11fd973a1f9e5321580c35d13e9ba25217a003e8.zip
Update.
* libio/wfileops.c (_IO_wdo_write): Correct return value.
-rw-r--r--ChangeLog2
-rw-r--r--libio/wfileops.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c1781e4d64..89225e2aab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
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.
diff --git a/libio/wfileops.c b/libio/wfileops.c
index fc75e16f10..52368abb60 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -60,7 +60,6 @@ _IO_wdo_write (fp, data, to_do)
_IO_size_t to_do;
{
struct _IO_codecvt *cc = &fp->_wide_data->_codecvt;
- _IO_size_t count = 0;
if (to_do > 0)
{
@@ -90,7 +89,6 @@ _IO_wdo_write (fp, data, to_do)
/* 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,
@@ -112,7 +110,7 @@ _IO_wdo_write (fp, data, to_do)
? fp->_wide_data->_IO_buf_base
: fp->_wide_data->_IO_buf_end);
- return count;
+ return to_do == 0 ? 0 : WEOF;
}