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:
@ -41,16 +41,6 @@ typedef struct aurora_monitor
|
||||
bool events[MAX_MONITOR_EVENT]; /**< Enabled monitor events */
|
||||
} AURORA_MONITOR;
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module is first loaded.
|
||||
*/
|
||||
/*lint -e14 */
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
}
|
||||
/*lint +e14 */
|
||||
|
||||
/**
|
||||
* @brief Update the status of a server
|
||||
*
|
||||
|
||||
@ -59,16 +59,6 @@ static MONITOR_OBJECT MyObject =
|
||||
diagnostics
|
||||
};
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
*/
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
MXS_NOTICE("Initialise the Multi-Master Monitor module.");
|
||||
}
|
||||
|
||||
/**
|
||||
* The module entry point routine. It is this routine that
|
||||
* must populate the structure that is referred to as the
|
||||
@ -80,6 +70,7 @@ ModuleInit()
|
||||
MONITOR_OBJECT *
|
||||
GetModuleObject()
|
||||
{
|
||||
MXS_NOTICE("Initialise the Multi-Master Monitor module.");
|
||||
return &MyObject;
|
||||
}
|
||||
/*lint +e14 */
|
||||
|
||||
@ -107,16 +107,6 @@ static MONITOR_OBJECT MyObject =
|
||||
diagnostics
|
||||
};
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
*/
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
MXS_NOTICE("Initialise the MySQL Monitor module.");
|
||||
}
|
||||
|
||||
/**
|
||||
* The module entry point routine. It is this routine that
|
||||
* must populate the structure that is referred to as the
|
||||
@ -128,6 +118,7 @@ ModuleInit()
|
||||
MONITOR_OBJECT *
|
||||
GetModuleObject()
|
||||
{
|
||||
MXS_NOTICE("Initialise the MySQL Monitor module.");
|
||||
return &MyObject;
|
||||
}
|
||||
|
||||
|
||||
@ -57,16 +57,6 @@ static MONITOR_OBJECT MyObject =
|
||||
diagnostics
|
||||
};
|
||||
|
||||
/**
|
||||
* The module initialisation routine, called when the module
|
||||
* is first loaded.
|
||||
*/
|
||||
void
|
||||
ModuleInit()
|
||||
{
|
||||
MXS_NOTICE("Initialise the MySQL Cluster Monitor module.");
|
||||
}
|
||||
|
||||
/**
|
||||
* The module entry point routine. It is this routine that
|
||||
* must populate the structure that is referred to as the
|
||||
@ -78,6 +68,7 @@ ModuleInit()
|
||||
MONITOR_OBJECT *
|
||||
GetModuleObject()
|
||||
{
|
||||
MXS_NOTICE("Initialise the MySQL Cluster Monitor module.");
|
||||
return &MyObject;
|
||||
}
|
||||
/*lint +e14 */
|
||||
|
||||
Reference in New Issue
Block a user