summaryrefslogtreecommitdiff
path: root/wcsmbs/wcsnrtombs.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/wcsnrtombs.c')
-rw-r--r--wcsmbs/wcsnrtombs.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/wcsmbs/wcsnrtombs.c b/wcsmbs/wcsnrtombs.c
index 37b525b7eb..815d7addb5 100644
--- a/wcsmbs/wcsnrtombs.c
+++ b/wcsmbs/wcsnrtombs.c
@@ -64,20 +64,16 @@ __wcsnrtombs (dst, src, nwc, len, ps)
{
char buf[256]; /* Just an arbitrary value. */
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)