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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:33 +0000 (18:19 -0400)
commit44ea72c5be36c31f53d21df1ea6fba8df939ce4c
treef22bbc6f7baf536fbe03915af01c3cc9086999f6
parent6ff151ad2551ff1abee9398b7bdb8ed34ca80095
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.025898 seconds and 4 git commands to generate.