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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 30 Oct 2019 19:14:53 +0000 (15:14 -0400)
commit85e6a1160e1dc8564a7bf86a9099f77f62cace7e
treefbe924b08bf655187e77c6e52ec788d54a03cfdf
parentb602018bfbd512fd2f8f41778f6560e9fb607bcb
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.027365 seconds and 4 git commands to generate.