Cleanup: usages of bt_value_array_borrow_element_by_index{,_const}()
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 24 Oct 2019 16:17:49 +0000 (12:17 -0400)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Sat, 26 Oct 2019 13:42:52 +0000 (09:42 -0400)
commit33f4e1fd0981727e78c82f97f64afbef5a3b056c
tree0cd6eb47b656708040e197cb84b99481eb0b46c5
parentf80e9ec14e8608e514891297246112606975b5f8
Cleanup: usages of bt_value_array_borrow_element_by_index{,_const}()

Checking the return value of this function against NULL is mostly
useless because in case of an out-of-bound access the function would
return a pointer value passed the end of the array (junk).

This commit removes NULL checks and `BT_ASSERT()`on the return value of
this function.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Ifea5772d6b9f61487ef7295763f8f8929649b125
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2253
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
src/cli/babeltrace2-cfg-cli-args.c
src/cli/babeltrace2.c
src/lib/trace-ir/attributes.c
src/lib/value.c
src/plugins/ctf/lttng-live/viewer-connection.c
tests/lib/plugin.c
tests/lib/test_bt_values.c
This page took 0.0248 seconds and 4 git commands to generate.