__ec_config_schema_dump(out, schema, schema_len, 0);
}
+enum ec_config_type ec_config_get_type(const struct ec_config *config)
+{
+ return config->type;
+}
+
struct ec_config *
ec_config_bool(bool boolean)
{
ec_config_list_add(struct ec_config *list,
struct ec_config *value)
{
- if (list == NULL || list->type != EC_CONFIG_TYPE_LIST) {
+ if (list == NULL || list->type != EC_CONFIG_TYPE_LIST || value == NULL) {
errno = EINVAL;
goto fail;
}
ec_config_dict_dup(const struct ec_keyval *dict)
{
struct ec_config *dup = NULL, *value;
- struct ec_keyval_iter *iter;
+ struct ec_keyval_iter *iter = NULL;
const char *key;
dup = ec_config_dict();