diff options
author | Harald Welte <laforge@osmocom.org> | 2019-12-01 13:38:20 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2019-12-01 13:45:03 +0100 |
commit | ae5016f1938dfb87817cc6d9ceb84cb361e4b17e (patch) | |
tree | 31a21e33d08f9e48d28855fa86e7dd1489fbe60c | |
parent | 7a35b78648a3a0761cbb0263b2d75bb5a6f2a3a2 (diff) |
Check for osmo_fsm_register() error return value
Change-Id: Idbc1557739b2a253b73914e6f1f18a6d169d882e
-rw-r--r-- | tests/fsm/fsm_dealloc_test.c | 2 | ||||
-rw-r--r-- | tests/fsm/fsm_test.c | 2 | ||||
-rw-r--r-- | tests/tdef/tdef_test.c | 2 | ||||
-rw-r--r-- | tests/use_count/use_count_test.c | 2 |
4 files changed, 4 insertions, 4 deletions
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); diff --git a/tests/tdef/tdef_test.c b/tests/tdef/tdef_test.c index 276330a8..9c0808ea 100644 --- a/tests/tdef/tdef_test.c +++ b/tests/tdef/tdef_test.c @@ -475,7 +475,7 @@ int main(int argc, char **argv) log_set_print_category(osmo_stderr_target, 1); log_set_use_color(osmo_stderr_target, 0); - osmo_fsm_register(&test_tdef_fsm); + OSMO_ASSERT(osmo_fsm_register(&test_tdef_fsm) == 0); test_tdef_get(argc > 1); test_tdef_get_nonexisting(); diff --git a/tests/use_count/use_count_test.c b/tests/use_count/use_count_test.c index 0b081c9c..95af3082 100644 --- a/tests/use_count/use_count_test.c +++ b/tests/use_count/use_count_test.c @@ -331,7 +331,7 @@ int main(int argc, char **argv) log_set_print_level(osmo_stderr_target, 1); log_set_use_color(osmo_stderr_target, 0); - osmo_fsm_register(&foo_fsm); + OSMO_ASSERT(osmo_fsm_register(&foo_fsm) == 0); test_use_count_fsm(); |