X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fecoli_node_seq.c;h=ff0c5de8e928ef39e75b82412f978088824b9c1c;hb=dec2d7fa17ae1e8b3d1dec8e396d057757baf4f3;hp=fa9eaacb11e07531478f8d8291ddca80b23072b0;hpb=833dc6c2a9c47b821548b197a1d1f96f60df7de8;p=protos%2Flibecoli.git diff --git a/lib/ecoli_node_seq.c b/lib/ecoli_node_seq.c index fa9eaac..ff0c5de 100644 --- a/lib/ecoli_node_seq.c +++ b/lib/ecoli_node_seq.c @@ -164,6 +164,8 @@ static void ec_node_seq_free_priv(struct ec_node *gen_node) for (i = 0; i < node->len; i++) ec_node_free(node->table[i]); ec_free(node->table); + node->table = NULL; + node->len = 0; } static const struct ec_config_schema ec_node_seq_subschema[] = { @@ -171,6 +173,9 @@ static const struct ec_config_schema ec_node_seq_subschema[] = { .desc = "A child node which is part of the sequence.", .type = EC_CONFIG_TYPE_NODE, }, + { + .type = EC_CONFIG_TYPE_NONE, + }, }; static const struct ec_config_schema ec_node_seq_schema[] = { @@ -179,7 +184,9 @@ static const struct ec_config_schema ec_node_seq_schema[] = { .desc = "The list of children nodes, to be parsed in sequence.", .type = EC_CONFIG_TYPE_LIST, .subschema = ec_node_seq_subschema, - .subschema_len = EC_COUNT_OF(ec_node_seq_subschema), + }, + { + .type = EC_CONFIG_TYPE_NONE, }, }; @@ -236,7 +243,6 @@ ec_node_seq_get_child(const struct ec_node *gen_node, size_t i, static struct ec_node_type ec_node_seq_type = { .name = "seq", .schema = ec_node_seq_schema, - .schema_len = EC_COUNT_OF(ec_node_seq_schema), .set_config = ec_node_seq_set_config, .parse = ec_node_seq_parse, .complete = ec_node_seq_complete,