From df5b14084b39821395408679a2fb6f74605182ce Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Sat, 4 Nov 2006 00:07:39 +0100 Subject: [PATCH] ooops, make it compile again. Signed-off-by: Pierre Habouzit --- lib-mime/rfc2047.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib-mime/rfc2047.c b/lib-mime/rfc2047.c index 6e79bee..442d2e4 100644 --- a/lib-mime/rfc2047.c +++ b/lib-mime/rfc2047.c @@ -69,12 +69,13 @@ typedef size_t (*encoder_t) (char *, const char *, size_t, returns number of converted chars from f, see iconv(3) */ static ssize_t -convert_string(const char *from, const char *f, ssize_t flen, +convert_string(const char *from, const char *f, size_t flen, const char *to, char **t, size_t *tlen) { iconv_t cd; char *buf, *ob; - size_t obl, n; + size_t obl; + ssize_t n; int e; cd = mutt_iconv_open(to, from, 0); @@ -250,8 +251,9 @@ static size_t try_block (const char *d, size_t dlen, cd = mutt_iconv_open (tocode, fromcode, 0); assert (cd != (iconv_t) (-1)); ib = d, ibl = dlen, ob = buf1, obl = sizeof (buf1) - m_strlen(tocode); - if (my_iconv(cd, &ib, &ibl, &ob, &obl) == (size_t) (-1) || - my_iconv(cd, 0, 0, &ob, &obl) == (size_t) (-1)) { + if (my_iconv(cd, &ib, &ibl, &ob, &obl) < 0 + || my_iconv(cd, 0, 0, &ob, &obl) < 0) + { assert (errno == E2BIG); iconv_close (cd); assert (ib > d); @@ -556,7 +558,7 @@ void _rfc2047_encode_string (char **pd, int encode_specials, int col) } void rfc2047_encode_string(char **pd) { - _rfc2047_encode_string(a, 0, 32); + _rfc2047_encode_string(pd, 0, 32); } void rfc2047_encode_adrlist (address_t * addr, const char *tag) -- 2.20.1