mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Deprecate bro_srandom(), replace with zeek::seed_random().
Avoiding zeek::srandom() to avoid potential for confusion with srandom()
This commit is contained in:
parent
d486af06b1
commit
b17627fa09
3 changed files with 16 additions and 2 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue