lib: metadata: transform fast path precond. checks to BT_ASSERT_PRE()
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 7 Mar 2018 00:25:48 +0000 (19:25 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 2 May 2019 03:41:50 +0000 (23:41 -0400)
commitd975f66c5dcfc7eade13db3edbc975d2055dfe4b
tree34b1fd5207dcb901a2eeace9e049c9f40e7dcdd5
parentf42867e2d049c1e7cad50cd097290a3adef8d54c
lib: metadata: transform fast path precond. checks to BT_ASSERT_PRE()

Use BT_ASSERT_PRE() to assert that trace, stream, stream class, event
class, and field type preconditions are satisfied instead of
unconditional run-time checks for typical fast path API functions
(getters).

Update `tests/lib/test_ctf_writer.c` accordingly to remove unit tests
which expect a specific return value when preconditions are not
satisfied.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
lib/ctf-ir/event-class.c
lib/ctf-ir/field-types.c
lib/ctf-ir/stream-class.c
lib/ctf-ir/stream.c
lib/ctf-ir/trace.c
tests/lib/test_ctf_writer.c
This page took 0.025054 seconds and 4 git commands to generate.