mv config_schema_{fix_value,initialize_item}()
This commit is contained in:
parent
b1dd34a7ba
commit
34c1df5171
10
common.c
10
common.c
@ -1866,11 +1866,11 @@ config_item_clone (struct config_item_ *self)
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
static void
|
||||
config_schema_fix_value
|
||||
(struct config_schema *schema, struct config_item_ *object, void *user_data)
|
||||
config_schema_initialize_item (struct config_schema *schema,
|
||||
struct config_item_ *parent, void *user_data)
|
||||
{
|
||||
struct config_item_ *item =
|
||||
str_map_find (&object->value.object, schema->name);
|
||||
str_map_find (&parent->value.object, schema->name);
|
||||
|
||||
bool replace = true;
|
||||
if (item)
|
||||
@ -1901,7 +1901,7 @@ config_schema_fix_value
|
||||
schema->name, e->message);
|
||||
|
||||
// This will free the old item if there was any
|
||||
str_map_set (&object->value.object, schema->name, item);
|
||||
str_map_set (&parent->value.object, schema->name, item);
|
||||
}
|
||||
|
||||
// Make sure the string subtype fits the schema
|
||||
@ -1921,7 +1921,7 @@ config_schema_apply_to_object (struct config_schema *schema_array,
|
||||
{
|
||||
hard_assert (object->type == CONFIG_ITEM_OBJECT);
|
||||
while (schema_array->name)
|
||||
config_schema_fix_value (schema_array++, object, user_data);
|
||||
config_schema_initialize_item (schema_array++, object, user_data);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
Loading…
Reference in New Issue
Block a user