X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/508764681b06bd42c81f5202b65c382c9585a0de..1e18bf0ab892a2ae9d3151c248b652898f7d7116:/sbr/m_mktemp.c diff --git a/sbr/m_mktemp.c b/sbr/m_mktemp.c index 2ab8d129..9a28b48a 100644 --- a/sbr/m_mktemp.c +++ b/sbr/m_mktemp.c @@ -1,5 +1,4 @@ -/* - * m_mktemp.c -- Construct a temporary file. +/* m_mktemp.c -- Construct a temporary file. * * This code is Copyright (c) 2010, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -9,6 +8,8 @@ #include #include #include +#include "m_maildir.h" +#include "m_mktemp.h" static void register_for_removal(const char *); @@ -155,7 +156,7 @@ m_mktemps( if (suffix == NULL) { if ((tmpfil = m_mktemp2(NULL, pfx_in, fd_ret, fp_ret))) { - return add(tmpfil, NULL); + return mh_xstrdup(tmpfil); } return NULL; } @@ -229,7 +230,7 @@ m_mktemps( char * -get_temp_dir() +get_temp_dir(void) { /* Ignore envvars if we are setuid */ if ((getuid()==geteuid()) && (getgid()==getegid())) { @@ -320,7 +321,7 @@ m_unlink(const char *pathname) { * Remove all registered temporary files. */ void -remove_registered_files_atexit() { +remove_registered_files_atexit(void) { unregister_for_removal(1); }