]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - string.c
Move para_tmpname() to file_write.c and make it static.
[paraslash.git] / string.c
index f51f3574f0cf372bdd8febb5ac517c45e3d92d59..d0bb60c5e0f72aa3fd6c6c17459affde20465055 100644 (file)
--- a/string.c
+++ b/string.c
@@ -231,27 +231,6 @@ void chop(char *buf)
                buf[n - 1] = '\0';
 }
 
-/**
- * Get a random filename.
- *
- * This is by no means a secure way to create temporary files in a hostile
- * directory like \p /tmp. However, it is OK to use for temp files, fifos,
- * sockets that are created in ~/.paraslash. Result must be freed by the
- * caller.
- *
- * \return A pointer to a random filename.
- */
-__must_check __malloc char *para_tmpname(void)
-{
-       struct timeval now;
-       unsigned int seed;
-
-       gettimeofday(&now, NULL);
-       seed = now.tv_usec;
-       srand(seed);
-       return make_message("%08i", rand());
-}
-
 /**
  * Get the logname of the current user.
  *