libosmocore/tests/bitvec
Vadim Yanitskiy 832d8b8633 bitvec: fix bitvec_unhex(): do not return 1 on success
This function is supposed to return 0 on success or 1 in case of
error. However, it used to return 1 even in case of success. The
reason is that length of the input string was not taken into
account and sscanf() was failing on '\0'.

Let's use osmo_hexparse() and rely on its return value.

P.S. Funny that the unit test expectations were wrong too.

Change-Id: I441a22c7964bb31688071d8bcf6a282d8c0187ff
2020-02-19 18:23:40 +07:00
..
bitvec_test.c tests/bitvec: add a unit test for bitvec_read_field() 2020-02-19 18:23:40 +07:00
bitvec_test.ok bitvec: fix bitvec_unhex(): do not return 1 on success 2020-02-19 18:23:40 +07:00