mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 23:45:51 +00:00
Prevent passing of non-POD types to POD-only interfaces:
This tidies up the code that produces random numbers to conform to programming best practices and reduce dependencies. * Use std::random_device instead of platform-specific code * Remove RandomNumbers class and use free functions instead
This commit is contained in:
committed by
Vinnie Falco
parent
60f27178b8
commit
b328ec2462
@@ -2895,7 +2895,8 @@ bool NetworkOPsImp::subServer (InfoSub::ref isrListener, Json::Value& jvResult,
|
||||
if (m_standalone)
|
||||
jvResult[jss::stand_alone] = m_standalone;
|
||||
|
||||
RandomNumbers::getInstance ().fillBytes (uRandom.begin (), uRandom.size ());
|
||||
// CHECKME: is it necessary to provide a random number here?
|
||||
random_fill (uRandom.begin (), uRandom.size ());
|
||||
|
||||
jvResult[jss::random] = to_string (uRandom);
|
||||
jvResult[jss::server_status] = strOperatingMode ();
|
||||
|
||||
Reference in New Issue
Block a user