Remove element from CONFIG_CONTEXT

The variable was set but never used.
This commit is contained in:
Markus Mäkelä 2018-08-01 18:59:00 +03:00
parent a252b45f18
commit d793fcbcb0
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 2 additions and 14 deletions

View File

@ -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;

View File

@ -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);