ctf: use create + append/insert functions when possible
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 29 Aug 2019 03:22:04 +0000 (23:22 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 29 Aug 2019 14:37:03 +0000 (10:37 -0400)
commit760b266cd90c1769b869d43ebba5f24f7b3c40e0
treefe81832d0adc7b73f1611d94ea8b14fcee27d704
parentbc70f84a59eacc7734dd15a6fbcc452168e3687f
ctf: use create + append/insert functions when possible

Make the query code use the container value functions that create a new
empty map/array and append it to the container at the same time.  It
requires less lines of code, but also makes ownership management easier:
from the start the created container is owned by the parent container.
So there is no need to track it and free it on failure.

Change-Id: Ie0e81c67f50c721ef62e159f6f1d28380078ca86
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1995
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
src/plugins/ctf/fs-src/query.c
This page took 0.023797 seconds and 4 git commands to generate.