- mutt_mktemp (tempfile);
- if ((i = open (tempfile, O_WRONLY | O_EXCL | O_CREAT, 0600)) == -1 ||
- (fp = fdopen (i, "w")) == NULL) {
- if (-1 != i) {
- close (i);
- unlink (tempfile);
- }
+ fp = m_tempfile(tempfile, _POSIX_PATH_MAX, NONULL(Tempdir), NULL);
+ if (fp == NULL) {