mv config_schema_{fix_value,initialize_item}()

This commit is contained in:
Přemysl Eric Janouch 2015-07-05 02:13:15 +02:00
parent b1dd34a7ba
commit 34c1df5171
1 changed files with 5 additions and 5 deletions

View File

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