X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=string.c;h=598a12f510ecef9cefe13811a848d89cfb90d9a8;hp=0a55ed20c299144aeaf048a3c98db5dafdae4978;hb=843950e7a85730b796bb6238b6e91111f7209c25;hpb=50c9de2ed8746a83002f51e74eae7b0378e1785e diff --git a/string.c b/string.c index 0a55ed20..598a12f5 100644 --- a/string.c +++ b/string.c @@ -1,19 +1,7 @@ /* * Copyright (C) 2004-2007 Andre Noll * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file string.c memory allocation and string handling functions */ @@ -253,8 +241,11 @@ void chop(char *buf) __must_check __malloc char *para_tmpname(void) { struct timeval now; + unsigned int seed; + gettimeofday(&now, NULL); - srand(now.tv_usec); + seed = now.tv_usec; + srand(seed); return make_message("%08i", rand()); }