Deprecate bro_srandom(), replace with zeek::seed_random().

Avoiding zeek::srandom() to avoid potential for confusion with srandom()
This commit is contained in:
Jon Siwek 2020-07-22 11:09:48 -07:00
parent d486af06b1
commit b17627fa09
3 changed files with 16 additions and 2 deletions

View file

@ -1078,7 +1078,7 @@ static void bro_srandom(unsigned int seed, bool deterministic)
srandom(seed);
}
void bro_srandom(unsigned int seed)
void zeek::seed_random(unsigned int seed)
{
if ( bro_rand_determistic )
bro_rand_state = seed == 0 ? 1 : seed;
@ -1086,6 +1086,11 @@ void bro_srandom(unsigned int seed)
srandom(seed);
}
void bro_srandom(unsigned int seed)
{
zeek::seed_random(seed);
}
void init_random_seed(const char* read_file, const char* write_file,
bool use_empty_seeds)
{