From 776617d02c2109762e24d2c4abdcc3424068da9d Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 28 Oct 2015 10:11:31 -0400 Subject: rand(): Don't automatically seed --- (limited to 'src') diff --git a/src/rand.sh b/src/rand.sh index 160e49e..6db1d1c 100644 --- a/src/rand.sh +++ b/src/rand.sh @@ -16,7 +16,6 @@ # along with this program. If not, see . rand_x=1 -rand_seeded=false srand() { @@ -24,18 +23,12 @@ srand() shift 1 rand_x=${x} - rand_seeded=true return 0 } rand() { - # Automatically seed the LCG. - if ! ${rand_seeded}; then - srand $(expr ${$} + $(date '+%s')) - fi - # Increment, multiplier, and modulus values are those used in glibc. rand_x=$((1103515245 * $rand_x + 12345)) rand_x=$(($rand_x % 4294967296)) -- cgit v0.9.1