mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Hash unification: address PR feedback
This commit is contained in:
parent
7f137b7d50
commit
ce8b121e12
8 changed files with 33 additions and 29 deletions
|
@ -1031,7 +1031,7 @@ static bool read_random_seeds(const char* read_file, uint32_t* seed,
|
|||
}
|
||||
|
||||
// Read seeds for hmac-md5/siphash/highwayhash.
|
||||
for ( int i = 0; i < KeyedHash::SEED_INIT_SIZE; ++i )
|
||||
for ( auto &v : buf )
|
||||
{
|
||||
int tmp;
|
||||
if ( fscanf(f, "%u", &tmp) != 1 )
|
||||
|
@ -1040,7 +1040,7 @@ static bool read_random_seeds(const char* read_file, uint32_t* seed,
|
|||
return false;
|
||||
}
|
||||
|
||||
buf[i] = tmp;
|
||||
v = tmp;
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
|
@ -1061,8 +1061,8 @@ static bool write_random_seeds(const char* write_file, uint32_t seed,
|
|||
|
||||
fprintf(f, "%u\n", seed);
|
||||
|
||||
for ( int i = 0; i < KeyedHash::SEED_INIT_SIZE; ++i )
|
||||
fprintf(f, "%u\n", buf[i]);
|
||||
for ( const auto &v: buf )
|
||||
fprintf(f, "%u\n", v);
|
||||
|
||||
fclose(f);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue