Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/topic/timw/fix-RANDMAX-check'
Browse files Browse the repository at this point in the history
* origin/topic/timw/fix-RANDMAX-check:
  Remove unused util::detail::rand64bit method
  • Loading branch information
timwoj committed Jul 1, 2022
2 parents d3b6f9f + ef659b8 commit ba96843
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
5.1.0-dev.154 | 2022-07-01 14:10:58 -0700

* Remove unused util::detail::rand64bit method (Tim Wojtulewicz, Corelight)

5.1.0-dev.151 | 2022-07-01 11:11:29 -0700

* Management framework: bump zeek-client and cluster testsuite (Christian Kreibich, Corelight)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.0-dev.151
5.1.0-dev.154
12 changes: 0 additions & 12 deletions src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -538,18 +538,6 @@ long int random_number()
return zeek_rand_state;
}

// Returns a 64-bit random string.
uint64_t rand64bit()
{
uint64_t base = 0;
int i;

static_assert(RAND_MAX == 2147483647); // 2^32-1
for ( i = 1; i <= 2; ++i )
base = (base << 32) | detail::random_number();
return base;
}

TEST_CASE("util is_package_loader")
{
CHECK(is_package_loader("/some/path/__load__.zeek") == true);
Expand Down
2 changes: 0 additions & 2 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ unsigned int initial_seed();
// Returns true if the user explicitly set a seed via init_random_seed();
extern bool have_random_seed();

extern uint64_t rand64bit();

/**
* A platform-independent PRNG implementation. Note that this is not
* necessarily a "statistically sound" implementation as the main purpose is
Expand Down

0 comments on commit ba96843

Please sign in to comment.