mirror of https://gerrit.osmocom.org/libosmocore
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:
parent
76bdbd4b2b
commit
342a522991
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue