From ccb7b056d604348f072e77d9b134a3f47e983fcb Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 15 Jul 2023 12:56:38 +0100 Subject: Replace rand/rand_s/random with the C++11 random number generator. --- src/inspircd.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index a4c6c9edc..c6aab7dac 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -341,15 +341,6 @@ namespace ServerInstance->Config->CommandLine.writelog = !do_nolog; ServerInstance->Config->CommandLine.writepid = !do_nopid; } - // Seeds the random number generator if applicable. - void SeedRng(timespec ts) - { -#if defined _WIN32 - srand(ts.tv_nsec ^ ts.tv_sec); -#elif !defined HAS_ARC4RANDOM_BUF - srandom(static_cast(ts.tv_nsec ^ ts.tv_sec)); -#endif - } // Sets handlers for various process signals. void SetSignals() @@ -468,7 +459,6 @@ InspIRCd::InspIRCd(int argc, char** argv) this->startup_time = TIME.tv_sec; IncreaseCoreDumpSize(); - SeedRng(TIME); SocketEngine::Init(); this->Config = new ServerConfig; -- cgit v1.3.1-10-gc9f91