Combine ModuleInit and GetModuleObject

The two functions can be combined into one as both are called only
once. This removes the need for the explicit ModuleInit function.
This commit is contained in:
Markus Mäkelä
2017-01-03 12:13:47 +02:00
parent 7df29aa1ec
commit 6c53999c97
45 changed files with 42 additions and 439 deletions

View File

@ -78,18 +78,6 @@ extern int execute_cmd(CLI_SESSION *cli);
static SPINLOCK instlock;
static CLI_INSTANCE *instances;
/**
* The module initialisation routine, called when the module
* is first loaded.
*/
void
ModuleInit()
{
MXS_NOTICE("Initialise debug CLI router module.");
spinlock_init(&instlock);
instances = NULL;
}
/**
* The module entry point routine. It is this routine that
* must populate the structure that is referred to as the
@ -101,6 +89,9 @@ ModuleInit()
ROUTER_OBJECT *
GetModuleObject()
{
MXS_NOTICE("Initialise debug CLI router module.");
spinlock_init(&instlock);
instances = NULL;
return &MyObject;
}