summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-10-28 10:11:31 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-10-28 10:11:53 (EDT)
commit776617d02c2109762e24d2c4abdcc3424068da9d (patch)
tree1ae1adc69a104ff3b95f47d670a9f1e868dedefb
parentfae62ed619d42ceea491d3be9770bd5f127c92f1 (diff)
downloadfirman.sh-776617d02c2109762e24d2c4abdcc3424068da9d.zip
firman.sh-776617d02c2109762e24d2c4abdcc3424068da9d.tar.gz
firman.sh-776617d02c2109762e24d2c4abdcc3424068da9d.tar.bz2
rand(): Don't automatically seed
-rw-r--r--src/rand.sh7
1 files changed, 0 insertions, 7 deletions
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 <http://www.gnu.org/licenses/>.
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))