From: Pierre Habouzit Date: Fri, 3 Nov 2006 23:07:39 +0000 (+0100) Subject: ooops, make it compile again. X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=df5b14084b39821395408679a2fb6f74605182ce ooops, make it compile again. Signed-off-by: Pierre Habouzit --- 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)