aboutsummaryrefslogtreecommitdiff
path: root/wcsmbs/wcsnrtombs.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-04-29 13:05:07 +0000
committerUlrich Drepper <drepper@redhat.com>1998-04-29 13:05:07 +0000
commitd079f32126a4d1005a646dd907b4c791df7b0934 (patch)
treeaad733726ded83c3e50268d94dd3f78a731bb9c2 /wcsmbs/wcsnrtombs.c
parent5e7a22c9c3d09ad8bdefb127eb4a0faeee5fbb0b (diff)
downloadglibc-d079f32126a4d1005a646dd907b4c791df7b0934.zip
glibc-d079f32126a4d1005a646dd907b4c791df7b0934.tar.gz
glibc-d079f32126a4d1005a646dd907b4c791df7b0934.tar.bz2
Update.
* wcsmbs/mbsrtowcs.c: Optimize a bit more. * wcsmbs/wcsrtombs.c: Likewise.
Diffstat (limited to 'wcsmbs/wcsnrtombs.c')
-rw-r--r--wcsmbs/wcsnrtombs.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/wcsmbs/wcsnrtombs.c b/wcsmbs/wcsnrtombs.c
index 815d7ad..eb4a96d 100644
--- a/wcsmbs/wcsnrtombs.c
+++ b/wcsmbs/wcsnrtombs.c
@@ -65,15 +65,18 @@ __wcsnrtombs (dst, src, nwc, len, ps)
char buf[256]; /* Just an arbitrary value. */
const wchar_t *inbuf = *src;
- 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,
- &result, 0);
+ {
+ data.outbuf = buf;
+
+ 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)