about summary refs log tree commit diff
path: root/iconv/iconv_prog.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconv/iconv_prog.c')
-rw-r--r--iconv/iconv_prog.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index 569bd3b3ec..2452a88c5e 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -299,12 +299,15 @@ process_block (iconv_t cd, const char *addr, size_t len, FILE *output)
 {
 #define OUTBUF_SIZE	32768
   char outbuf[OUTBUF_SIZE];
-  char *outptr = outbuf;
-  size_t outlen = OUTBUF_SIZE;
+  char *outptr;
+  size_t outlen;
+  size_t n;
 
   while (len > 0)
     {
-      size_t n = iconv (cd, &addr, &len, &outptr, &outlen);
+      outptr = outbuf;
+      outlen = OUTBUF_SIZE;
+      n = iconv (cd, &addr, &len, &outptr, &outlen);
 
       if (outptr != outbuf)
 	{