outrepl = "?";
my_iconv(cd, 0, 0, &ob, &obl);
if (obl) {
- int n = m_strlen(outrepl);
+ size_t n = m_strlen(outrepl);
if (n > obl) {
outrepl = "?";
p_delete(ps);
*ps = buf;
-
- str_adjust (ps);
return 0;
}
else
fc->inrepls = mutt_is_utf8 (to) ? repls : repls + 1;
}
else
- fc = p_new(struct fgetconv_not, 1);
+ fc = p_new(struct fgetconv_s, 1);
fc->file = file;
fc->cd = cd;
return (FGETCONV *) fc;
{
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);
obl = 4 * flen + 1;
ob = buf = xmalloc(obl);
n = my_iconv(cd, &f, &flen, &ob, &obl);
- if (n == (size_t) (-1) || my_iconv(cd, 0, 0, &ob, &obl) == (size_t) (-1)) {
+ if (n < 0 || my_iconv(cd, 0, 0, &ob, &obl) < 0) {
e = errno;
p_delete(&buf);
iconv_close (cd);