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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:22 +0000 (11:58 -0400)
commitde37c3a9310f1fddfe6d5775719a6dc22868bc01
treecedc0181ba896f0090ba07ab108cb56123da9b9c
parentb61026e6e9148fc6e9a9c24c84597f570c7fdd8b
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.024633 seconds and 4 git commands to generate.