safe_fclose -> m_fclose, and is now inlined.
[apps/madmutt.git] / lib-mx / mh.c
index 2d79be8..c2abc74 100644 (file)
@@ -151,7 +151,7 @@ static void mh_read_sequences (struct mh_sequences *mhs, const char *path)
   }
 
   p_delete(&buff);
-  safe_fclose (&fp);
+  m_fclose(&fp);
 }
 
 int mh_buffy (const char *path)
@@ -292,7 +292,7 @@ static void mh_update_sequences (CONTEXT * ctx)
       fprintf (nfp, "%s\n", buff);
     }
   }
-  safe_fclose (&ofp);
+  m_fclose(&ofp);
 
   /* now, update our unseen, flagged, and replied sequences */
   for (l = 0; l < ctx->msgcount; l++) {
@@ -332,7 +332,7 @@ static void mh_update_sequences (CONTEXT * ctx)
 
 
   /* try to commit the changes - no guarantee here */
-  safe_fclose (&nfp);
+  m_fclose(&nfp);
 
   unlink (sequences);
   if (safe_rename (tmpfname, sequences) != 0) {
@@ -391,7 +391,7 @@ static void mh_sequences_add_one (CONTEXT * ctx, int n, short unseen,
         fprintf (nfp, "%s\n", buff);
     }
   }
-  safe_fclose (&ofp);
+  m_fclose(&ofp);
   p_delete(&buff);
 
   if (!unseen_done && unseen)
@@ -401,7 +401,7 @@ static void mh_sequences_add_one (CONTEXT * ctx, int n, short unseen,
   if (!replied_done && replied)
     fprintf (nfp, "%s: %d\n", NONULL (MhReplied), n);
 
-  safe_fclose (&nfp);
+  m_fclose(&nfp);
 
   unlink (sequences);
   if (safe_rename (tmpfname, sequences) != 0)
@@ -988,7 +988,7 @@ static int maildir_commit_message (MESSAGE * msg, CONTEXT * ctx, HEADER * hdr)
   char full[_POSIX_PATH_MAX];
   char *s;
 
-  if (safe_fclose (&msg->fp) != 0)
+  if (m_fclose(&msg->fp) != 0)
     return -1;
 
   /* extract the subdir */
@@ -1056,7 +1056,7 @@ static int _mh_commit_message (MESSAGE * msg, CONTEXT * ctx, HEADER * hdr,
   char path[_POSIX_PATH_MAX];
   char tmp[16];
 
-  if (safe_fclose (&msg->fp) != 0)
+  if (m_fclose(&msg->fp) != 0)
     return -1;
 
   if ((dirp = opendir (ctx->path)) == NULL) {
@@ -1594,7 +1594,7 @@ static int mh_check_mailbox (CONTEXT * ctx, int *index_hint, int unused __attrib
     FILE *fp = NULL;
 
     if (mh_mkstemp (ctx, &fp, &tmp) == 0) {
-      safe_fclose (&fp);
+      m_fclose(&fp);
       if (safe_rename (tmp, buf) == -1)
         unlink (tmp);
       p_delete(&tmp);