From ae5016f1938dfb87817cc6d9ceb84cb361e4b17e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 1 Dec 2019 13:38:20 +0100 Subject: Check for osmo_fsm_register() error return value Change-Id: Idbc1557739b2a253b73914e6f1f18a6d169d882e --- tests/fsm/fsm_dealloc_test.c | 2 +- tests/fsm/fsm_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/fsm') diff --git a/tests/fsm/fsm_dealloc_test.c b/tests/fsm/fsm_dealloc_test.c index 9a6974d9..48f80e57 100644 --- a/tests/fsm/fsm_dealloc_test.c +++ b/tests/fsm/fsm_dealloc_test.c @@ -452,7 +452,7 @@ int main(void) log_set_category_filter(osmo_stderr_target, DLGLOBAL, 1, LOGL_DEBUG); - osmo_fsm_register(&test_fsm); + OSMO_ASSERT(osmo_fsm_register(&test_fsm) == 0); test_osmo_fsm_term_safely(); test_osmo_fsm_set_dealloc_ctx(); diff --git a/tests/fsm/fsm_test.c b/tests/fsm/fsm_test.c index f8ebdc7b..911aad8c 100644 --- a/tests/fsm/fsm_test.c +++ b/tests/fsm/fsm_test.c @@ -417,7 +417,7 @@ int main(int argc, char **argv) g_ctx = NULL; OSMO_ASSERT(osmo_fsm_find_by_name(fsm.name) == NULL); - osmo_fsm_register(&fsm); + OSMO_ASSERT(osmo_fsm_register(&fsm) == 0); OSMO_ASSERT(osmo_fsm_find_by_name(fsm.name) == &fsm); OSMO_ASSERT(osmo_fsm_inst_find_by_name(&fsm, "my_id") == NULL); -- cgit v1.2.3