ooops, make it compile again.
authorPierre Habouzit <madcoder@debian.org>
Fri, 3 Nov 2006 23:07:39 +0000 (00:07 +0100)
committerPierre Habouzit <madcoder@debian.org>
Fri, 3 Nov 2006 23:07:39 +0000 (00:07 +0100)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
lib-mime/rfc2047.c

index 6e79bee..442d2e4 100644 (file)
@@ -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)