diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-08 08:54:01 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-08 08:54:01 +0000 |
commit | e9bdbbdb755ee451302c3d834ad20f77d80754f0 (patch) | |
tree | 8cb36dd73ebbf3f35093283babb3838cc88a97bc /random.c | |
parent | c0228ba5567253cca38bf671f0df51b247de2a8c (diff) |
2000-02-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -76,8 +76,8 @@ void srand48 _((long)); #endif /* not HAVE_DRAND48 */ -#ifdef HAVE_RANDOM static int first = 1; +#ifdef HAVE_RANDOM static char state[256]; #endif @@ -91,12 +91,12 @@ rand_init(seed) #ifdef HAVE_RANDOM if (first == 1) { initstate(1, state, sizeof state); - first = 0; } else { setstate(state); } #endif + first = 0; SRANDOM(seed); old = saved_seed; @@ -135,8 +135,6 @@ rb_f_rand(obj, vmax) { long val, max; - static initialized = 0; - if (first) { struct timeval tv; |