tests/tdef: assert pointer returned by osmo_tdef_get_entry()

Coverity complains that we do check if osmo_tdef_get_entry() returns
NULL 39 out of 40 times.  Check it in test_tdef_set_and_get() too.

Change-Id: I96041eab2786d850a49cb38a60a368cef2e476d3
Related: CID#274729
This commit is contained in:
Vadim Yanitskiy 2022-07-20 05:10:04 +07:00
parent 76bdbd4b2b
commit 342a522991
1 changed files with 1 additions and 0 deletions

View File

@ -143,6 +143,7 @@ static void test_tdef_set_and_get()
printf("setting 7 = 42\n");
t = osmo_tdef_get_entry(tdefs, 7);
OSMO_ASSERT(t != NULL);
OSMO_ASSERT(osmo_tdef_val_in_range(t, 42));
t->val = 42;
print_tdef_info(7);