cpp-common/bt2: check return value in `CommonVariantField::selectedOption()`
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 29 Feb 2024 19:21:36 +0000 (14:21 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 26 Mar 2024 18:56:36 +0000 (14:56 -0400)
commitb5cc976beb06b03b46950d3b3505d763021bdf7a
tree2489d725b5e3a5946e70c4d893a1c530f6a9b851
parentd2ba27dd1502473c84d22acfa14e5a5c33fd194b
cpp-common/bt2: check return value in `CommonVariantField::selectedOption()`

Instead of ignoring the return value of
bt_field_variant_select_option_by_index(), check it with
BT_ASSERT_DBG().  This probably won't ever make a difference since
bt_field_variant_select_option_by_index() can't fail for now, but it
looks better.

Change-Id: I2354adfa1358ef0bd77b1d7c6604eef8ccaaa018
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11950
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/cpp-common/bt2/field.hpp
This page took 0.025571 seconds and 4 git commands to generate.