X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=string.c;h=d0bb60c5e0f72aa3fd6c6c17459affde20465055;hp=f51f3574f0cf372bdd8febb5ac517c45e3d92d59;hb=a18295788a381a5083e42fde7d7615b328bb6509;hpb=3f586245327dfe951bcd4bd73d91f52ba9541724 diff --git a/string.c b/string.c index f51f3574..d0bb60c5 100644 --- 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. *