X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Factions%2Fpath.c;h=7f4955475aa9775f9001e9a34aebca0e5b864874;hb=cb9222ff73524b91bee4f968613a78340a727a04;hp=dbae34b9eb44f2e8609c6adc6b7e4d8cb3e9999a;hpb=27993cc2e9edb3f5a59bc2c16439e063462235e5;p=lttng-tools.git diff --git a/src/common/actions/path.c b/src/common/actions/path.c index dbae34b9e..7f4955475 100644 --- a/src/common/actions/path.c +++ b/src/common/actions/path.c @@ -29,10 +29,6 @@ struct lttng_action_path *lttng_action_path_create( } lttng_dynamic_array_init(&path->indexes, sizeof(uint64_t), NULL); - ret = lttng_dynamic_array_set_count(&path->indexes, index_count); - if (ret) { - goto error; - } for (i = 0; i < index_count; i++) { ret = lttng_dynamic_array_add_element( @@ -112,11 +108,6 @@ int lttng_action_path_copy(const struct lttng_action_path *src, lttng_dynamic_array_init(&dst->indexes, sizeof(uint64_t), NULL); src_count = lttng_dynamic_array_get_count(&src->indexes); - ret = lttng_dynamic_array_set_count(&dst->indexes, src_count); - if (ret) { - goto error; - } - for (i = 0; i < src_count; i++) { const void *index = lttng_dynamic_array_get_element( &src->indexes, i); @@ -173,6 +164,7 @@ ssize_t lttng_action_path_create_from_payload( } ret = consumed_size; + *_action_path = action_path; end: return ret; }