Remove element from CONFIG_CONTEXT
The variable was set but never used.
This commit is contained in:
@ -227,7 +227,6 @@ typedef struct config_context
|
|||||||
{
|
{
|
||||||
char *object; /**< The name of the object being configured */
|
char *object; /**< The name of the object being configured */
|
||||||
MXS_CONFIG_PARAMETER *parameters; /**< The list of parameter values */
|
MXS_CONFIG_PARAMETER *parameters; /**< The list of parameter values */
|
||||||
void *element; /**< The element created from the data */
|
|
||||||
bool was_persisted; /**< True if this object was persisted */
|
bool was_persisted; /**< True if this object was persisted */
|
||||||
struct config_context *next; /**< Next pointer in the linked list */
|
struct config_context *next; /**< Next pointer in the linked list */
|
||||||
} CONFIG_CONTEXT;
|
} CONFIG_CONTEXT;
|
||||||
|
|||||||
@ -519,7 +519,6 @@ CONFIG_CONTEXT* config_context_create(const char *section)
|
|||||||
ctx->was_persisted = is_persisted_config;
|
ctx->was_persisted = is_persisted_config;
|
||||||
ctx->parameters = NULL;
|
ctx->parameters = NULL;
|
||||||
ctx->next = NULL;
|
ctx->next = NULL;
|
||||||
ctx->element = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
@ -3410,11 +3409,7 @@ int create_new_service(CONFIG_CONTEXT *obj)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error_count == 0)
|
if (error_count != 0)
|
||||||
{
|
|
||||||
obj->element = service;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
service_free(service);
|
service_free(service);
|
||||||
service = nullptr;
|
service = nullptr;
|
||||||
@ -3559,8 +3554,6 @@ int create_new_monitor(CONFIG_CONTEXT *obj, std::set<std::string>& monitored_ser
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
obj->element = monitor;
|
|
||||||
|
|
||||||
int error_count = 0;
|
int error_count = 0;
|
||||||
|
|
||||||
// TODO: Parse this in the configuration
|
// TODO: Parse this in the configuration
|
||||||
@ -3677,11 +3670,7 @@ int create_new_filter(CONFIG_CONTEXT *obj)
|
|||||||
{
|
{
|
||||||
config_add_defaults(obj, mod->parameters);
|
config_add_defaults(obj, mod->parameters);
|
||||||
|
|
||||||
if (MXS_FILTER_DEF* filter = filter_alloc(obj->object, module, obj->parameters))
|
if (!filter_alloc(obj->object, module, obj->parameters))
|
||||||
{
|
|
||||||
obj->element = filter;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
MXS_ERROR("Failed to create filter '%s'. Memory allocation failed.",
|
MXS_ERROR("Failed to create filter '%s'. Memory allocation failed.",
|
||||||
obj->object);
|
obj->object);
|
||||||
|
|||||||
Reference in New Issue
Block a user