Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cc/algorithms/rand.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ SecureURBG& SecureURBG::GetInstance() {
}

SecureURBG::result_type SecureURBG::operator()() {
absl::WriterMutexLock lock(&mutex_);
absl::WriterMutexLock lock(mutex_);
if (current_index_ + sizeof(result_type) > kBufferSize) {
RefreshBuffer();
}
Expand All @@ -106,7 +106,7 @@ SecureURBG::result_type SecureURBG::operator()() {
void SecureURBG::RefreshBuffer() {
int one_on_success = 0;
{
absl::MutexLock lock(&global_mutex);
absl::MutexLock lock(global_mutex);
one_on_success = RAND_bytes(buffer_, kBufferSize);
}
CHECK(one_on_success == 1)
Expand Down
Loading