Initialize random number generator in main
The random number generator can be initialized when MaxScale's other systems are being initialized. This removes the need to initialized it when the function is used for the first time.
This commit is contained in:
@ -67,6 +67,7 @@
|
||||
#include <maxscale/thread.h>
|
||||
#include <maxscale/utils.h>
|
||||
#include <maxscale/version.h>
|
||||
#include <maxscale/random_jkiss.h>
|
||||
|
||||
#include "maxscale/config.h"
|
||||
#include "maxscale/maxscale.h"
|
||||
@ -1666,6 +1667,9 @@ int main(int argc, char **argv)
|
||||
goto return_main;
|
||||
}
|
||||
|
||||
/** Initialize the random number generator */
|
||||
random_jkiss_init();
|
||||
|
||||
if (!utils_init())
|
||||
{
|
||||
const char* logerr = "Failed to initialise utility library.";
|
||||
|
Reference in New Issue
Block a user