From 71f76a1f42958ca6dca26669daf41a568d694c18 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sat, 31 Mar 2018 16:30:25 +0200 Subject: fsm: id: properly set name in case of NULL id Since alloc relies on osmo_fsm_inst_update_id() to set the name, never skip that. In osmo_fsm_inst_alloc(), we allow passing a NULL id, and in osmo_fsm_inst_update_id(), we set the name without id if id is NULL. Change-Id: I6d6b09a811b82770818f19b189a57d9fc4a8133b --- tests/fsm/fsm_test.err | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/fsm/fsm_test.err') diff --git a/tests/fsm/fsm_test.err b/tests/fsm/fsm_test.err index bc159bda..c4ee46f9 100644 --- a/tests/fsm/fsm_test.err +++ b/tests/fsm/fsm_test.err @@ -13,7 +13,7 @@ Checking FSM allocation --- test_id_api() Test_FSM{NULL}: Allocated  osmo_fsm_inst_name() == "Test_FSM" - osmo_fsm_inst_find_by_name("Test_FSM") == NULL + osmo_fsm_inst_find_by_name("Test_FSM") == fi osmo_fsm_inst_update_id("my_id") rc == 0, ok osmo_fsm_inst_name() == "Test_FSM(my_id)" -- cgit v1.2.3