exit mem_realloc, enters p_realloc/xrealloc.
[apps/madmutt.git] / rfc2047.c
index ae4a52b..9452b3b 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -21,7 +21,6 @@
 #include "rfc2047.h"
 #include "thread.h"
 
-#include "lib/mem.h"
 #include "lib/str.h"
 
 #include <ctype.h>
@@ -77,7 +76,7 @@ static size_t convert_string (const char *f, size_t flen,
 
   *tlen = ob - buf;
 
-  mem_realloc (&buf, ob - buf + 1);
+  p_realloc(&buf, ob - buf + 1);
   *t = buf;
   iconv_close (cd);
 
@@ -482,7 +481,7 @@ static int rfc2047_encode (const char *d, size_t dlen, int col,
 #define LINEBREAK "\n\t"
     if (bufpos + wlen + str_len (LINEBREAK) > buflen) {
       buflen = bufpos + wlen + str_len (LINEBREAK);
-      mem_realloc (&buf, buflen);
+      p_realloc(&buf, buflen);
     }
     r = encode_block (buf + bufpos, t, n, icode, tocode, encoder);
     assert (r == wlen);
@@ -498,7 +497,7 @@ static int rfc2047_encode (const char *d, size_t dlen, int col,
 
   /* Add last encoded word and us-ascii suffix to buffer. */
   buflen = bufpos + wlen + (u + ulen - t1);
-  mem_realloc (&buf, buflen + 1);
+  p_realloc(&buf, buflen + 1);
   r = encode_block (buf + bufpos, t, t1 - t, icode, tocode, encoder);
   assert (r == wlen);
   bufpos += wlen;