X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sendlib.c;h=2bad9a69db6026e844578bf17034d1baa38ac5d9;hp=042ca3ac595807fbcca1fa45e29d6af6a6f8cb40;hb=6ebff74ad242d4c56fb7762965b19cee14fd2daa;hpb=7b392ef7b50798f9eb3e7c869e634c5fef0092d1 diff --git a/sendlib.c b/sendlib.c index 042ca3a..2bad9a6 100644 --- a/sendlib.c +++ b/sendlib.c @@ -395,7 +395,7 @@ int mutt_write_mime_body (BODY * a, FILE * f) #undef write_as_text_part fgetconv_close (&fc); - fclose (fpin); + m_fclose(&fpin); return (ferror (f) ? -1 : 0); } @@ -776,7 +776,7 @@ CONTENT *mutt_get_content_info (const char *fname, BODY * b) } b->file_charset = fromcode; p_delete(&tocode); - safe_fclose (&fp); + m_fclose(&fp); return info; } } @@ -786,7 +786,7 @@ CONTENT *mutt_get_content_info (const char *fname, BODY * b) update_content_info (info, &state, buffer, r); update_content_info (info, &state, 0, 0); - safe_fclose (&fp); + m_fclose(&fp); if (b != NULL && b->type == TYPETEXT && (!b->noconv && !b->force_charset)) parameter_setval(&b->parameter, "charset", @@ -885,7 +885,7 @@ int mutt_lookup_mime_type (BODY * att, const char *path) p = NULL; } } - fclose (f); + m_fclose(&f); } } @@ -918,7 +918,7 @@ void mutt_message_to_7bit (BODY * a, FILE * fp) a->offset = 0; if (stat (a->filename, &sb) == -1) { mutt_perror ("stat"); - fclose (fpin); + m_fclose(&fpin); } a->length = sb.st_size; } @@ -946,9 +946,9 @@ cleanup: p_delete(&line); if (fpin && !fp) - fclose (fpin); + m_fclose(&fpin); if (fpout) - fclose (fpout); + m_fclose(&fpout); else return; @@ -995,7 +995,7 @@ static void transform_to_7bit (BODY * a, FILE * fpin) } s.fpin = fpin; mutt_decode_attachment (a, &s); - fclose (s.fpout); + m_fclose(&s.fpout); a->d_filename = a->filename; a->filename = m_strdup(buff); a->unlink = 1; @@ -1167,7 +1167,7 @@ BODY *mutt_make_message_attach (CONTEXT * ctx, HEADER * hdr, int attach_msg) mutt_update_encoding (body); body->parts = body->hdr->content; - fclose (fp); + m_fclose(&fp); return (body); } @@ -2085,7 +2085,7 @@ static int _mutt_bounce_message (FILE * fp, HEADER * h, address_t * to, mutt_copy_header (fp, h, f, ch_flags, NULL); fputc ('\n', f); mutt_copy_bytes (fp, f, h->content->length); - fclose (f); + m_fclose(&f); ret = mutt_invoke_mta(env_from, to, NULL, NULL, tempfile, h->content->encoding == ENC8BIT); @@ -2265,7 +2265,7 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid, fflush (tempfp); if (ferror (tempfp)) { - fclose (tempfp); + m_fclose(&tempfp); unlink (tempfile); mx_commit_message (msg, &f); /* XXX - really? */ mx_close_message (&msg); @@ -2283,7 +2283,7 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid, /* copy the body and clean up */ rewind (tempfp); r = mutt_copy_stream (tempfp, msg->fp); - if (fclose (tempfp) != 0) + if (m_fclose(&tempfp) != 0) r = -1; /* if there was an error, leave the temp version */ if (!r)