* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
#include "un-namespace.h"
FILE *
-tmpfile()
+tmpfile(void)
{
sigset_t set, oset;
FILE *fp;
if (tmpdir == NULL)
tmpdir = _PATH_TMP;
+ if (*tmpdir == '\0')
+ return (NULL);
+
(void)asprintf(&buf, "%s%s%s", tmpdir,
(tmpdir[strlen(tmpdir) - 1] == '/') ? "" : "/", TRAILER);
if (buf == NULL)