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