aboutsummaryrefslogtreecommitdiffstats
path: root/www/mnogosearch/files
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-04-23 17:55:03 +0800
committerache <ache@FreeBSD.org>2001-04-23 17:55:03 +0800
commit46b4741541f95a7e85bbe2a5d625b01b1ba61ea5 (patch)
treed9519ef044b1dca59bd2d25a9e5ff3816391637d /www/mnogosearch/files
parentfc6cf11279b1a73b6fe3f984609d94ab61cca691 (diff)
downloadfreebsd-ports-gnome-46b4741541f95a7e85bbe2a5d625b01b1ba61ea5.tar.gz
freebsd-ports-gnome-46b4741541f95a7e85bbe2a5d625b01b1ba61ea5.tar.zst
freebsd-ports-gnome-46b4741541f95a7e85bbe2a5d625b01b1ba61ea5.zip
rand-related fixes
Diffstat (limited to 'www/mnogosearch/files')
-rw-r--r--www/mnogosearch/files/patch-ac22
1 files changed, 20 insertions, 2 deletions
diff --git a/www/mnogosearch/files/patch-ac b/www/mnogosearch/files/patch-ac
index 68f8816a275e..f1cd4ec1ab66 100644
--- a/www/mnogosearch/files/patch-ac
+++ b/www/mnogosearch/files/patch-ac
@@ -1,5 +1,23 @@
---- src/search.c.old Wed Feb 28 15:28:10 2001
-+++ src/search.c Thu Apr 19 18:02:10 2001
+--- src/search.c.orig Wed Feb 28 15:28:10 2001
++++ src/search.c Mon Apr 23 06:46:50 2001
+@@ -431,7 +431,7 @@
+ s=str+1;
+ while((*s)&&(isdigit(*s)))s++;
+ j=atoi(UdmTrim(s,"= \t\r\n"));
+- if((i>0)&&(i<MAXRANDOM)){
++ if((i>=0)&&(i<MAXRANDOM)){
+ frand=rand();
+ frand=frand/RAND_MAX*j;
+ Randoms[i]=frand;
+@@ -1225,7 +1225,7 @@
+ int i;
+ time_t tclock;
+ tclock=time(0);
+- srand((unsigned)tclock);
++ srand((unsigned)(tclock^(getpid()<<16)));
+ for(i=0;i<MAXRANDOM;i++)
+ Randoms[i]=0;
+ }
@@ -1269,7 +1269,8 @@
strcpy(template,env);