nonzero rather than zero.
git-svn-id: svn://svn.tartarus.org/sgt/putty@9935
cda61777-01e9-0310-a592-
d414129be87e
if (!random_active) {
memset(&pool, 0, sizeof(pool)); /* just to start with */
if (!random_active) {
memset(&pool, 0, sizeof(pool)); /* just to start with */
noise_get_heavy(random_add_heavynoise_bitbybit);
random_stir();
next_noise_collection =
schedule_timer(NOISE_REGULAR_INTERVAL, random_timer, &pool);
}
noise_get_heavy(random_add_heavynoise_bitbybit);
random_stir();
next_noise_collection =
schedule_timer(NOISE_REGULAR_INTERVAL, random_timer, &pool);
}
}
void random_unref(void)
{
}
void random_unref(void)
{
+ assert(random_active > 0);
+ if (random_active == 1) {
+ random_save_seed();
+ expire_timer_context(&pool);
+ }
- assert(random_active >= 0);
- if (random_active) return;
-
- expire_timer_context(&pool);