summaryrefslogtreecommitdiff
path: root/src/mongo/tools
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-10-09 17:09:10 +0000
committerevergreen <evergreen@mongodb.com>2019-10-09 17:09:10 +0000
commite1f433d2c47f623ceb5d1d1aee7605fefb71b846 (patch)
treec5e9cf60c65093839d1402e9755faf8342dd78e4 /src/mongo/tools
parent3cb9e7903a73e0bbcd1b00823bbd53e0f4341acd (diff)
downloadmongo-e1f433d2c47f623ceb5d1d1aee7605fefb71b846.tar.gz
SERVER-43641 upgrade random.h
This reverts commit a40b196bd3cecd0b66a6323f57e6f08efe0af392.
Diffstat (limited to 'src/mongo/tools')
-rw-r--r--src/mongo/tools/mongobridge_options.cpp3
-rw-r--r--src/mongo/tools/mongoebench_options.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/tools/mongobridge_options.cpp b/src/mongo/tools/mongobridge_options.cpp
index 79d27417659..81a116df714 100644
--- a/src/mongo/tools/mongobridge_options.cpp
+++ b/src/mongo/tools/mongobridge_options.cpp
@@ -70,8 +70,7 @@ Status storeMongoBridgeOptions(const moe::Environment& params,
}
if (!params.count("seed")) {
- std::unique_ptr<SecureRandom> seedSource{SecureRandom::create()};
- mongoBridgeGlobalParams.seed = seedSource->nextInt64();
+ mongoBridgeGlobalParams.seed = SecureRandom().nextInt64();
} else {
mongoBridgeGlobalParams.seed = static_cast<int64_t>(params["seed"].as<long>());
}
diff --git a/src/mongo/tools/mongoebench_options.cpp b/src/mongo/tools/mongoebench_options.cpp
index 0ba4394d976..f2982ee028a 100644
--- a/src/mongo/tools/mongoebench_options.cpp
+++ b/src/mongo/tools/mongoebench_options.cpp
@@ -94,7 +94,7 @@ Status storeMongoeBenchOptions(const moe::Environment& params,
}
int64_t seed = params.count("seed") ? static_cast<int64_t>(params["seed"].as<long>())
- : SecureRandom::create()->nextInt64();
+ : SecureRandom().nextInt64();
if (mongoeBenchGlobalParams.preConfig) {
mongoeBenchGlobalParams.preConfig->randomSeed = seed;