X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=string.c;h=51985404817d032261d0f19ba2ebce35682156dd;hp=38c68ecb64349ee9fee350d14e151e1093526df2;hb=afb43ec103ea5c0e194451c1289c514faee3b2e5;hpb=337d7784b0f8bc30b1fa9af56ace503acd97d40d diff --git a/string.c b/string.c index 38c68ecb..51985404 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. *