From 5e7a22c9c3d09ad8bdefb127eb4a0faeee5fbb0b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 29 Apr 1998 12:15:49 +0000 Subject: Update. 1998-04-29 12:11 Ulrich Drepper * wcsmbs/mbsnrtowcs.c: Remove variable to pass to conversion function by letting the later modify the variable computing the total directly. * wcsmbs/mbsrtowcs.c: Likewise. * wcsmbs/wcsnrtombs.c: Likewise. * wcsmbs/wcsrtombs.c: Likewise. * wcsmbs/btowc.c (converted): Rename variable to dummy to make clear it is not used. * wcsmbs/wctoc.c: Likewise. --- wcsmbs/wcsrtombs.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'wcsmbs/wcsrtombs.c') diff --git a/wcsmbs/wcsrtombs.c b/wcsmbs/wcsrtombs.c index b055a09..ba2d8dc 100644 --- a/wcsmbs/wcsrtombs.c +++ b/wcsmbs/wcsrtombs.c @@ -57,20 +57,16 @@ __wcsrtombs (dst, src, len, ps) char buf[256]; /* Just an arbitrary value. */ const wchar_t *srcend = *src + __wcslen (*src) + 1; const wchar_t *inbuf = *src; - size_t written; data.outbuf = buf; data.outbufend = buf + sizeof (buf); do - { - status = (*__wcsmbs_gconv_fcts.tomb->fct) (__wcsmbs_gconv_fcts.tomb, - &data, - (const char **) &inbuf, - (const char *) srcend, - &written, 0); - result += written; - } + status = (*__wcsmbs_gconv_fcts.tomb->fct) (__wcsmbs_gconv_fcts.tomb, + &data, + (const char **) &inbuf, + (const char *) srcend, + &result, 0); while (status == GCONV_FULL_OUTPUT); if ((status == GCONV_OK || status == GCONV_EMPTY_INPUT) -- cgit v1.1