aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/db/db_test.c4
-rw-r--r--openbsc/tests/gsm0408/gsm0408_test.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c
index a02d1f801..faea82055 100644
--- a/openbsc/tests/db/db_test.c
+++ b/openbsc/tests/db/db_test.c
@@ -200,7 +200,7 @@ int main()
alice->lac=42;
db_sync_subscriber(alice);
/* Get by TMSI */
- snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi);
+ snprintf(scratch_str, sizeof(scratch_str), "0x%08x", alice->tmsi);
alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str);
COMPARE(alice, alice_db);
SUBSCR_PUT(alice_db);
@@ -227,7 +227,7 @@ int main()
db_subscriber_assoc_imei(alice, "1234567890");
db_subscriber_assoc_imei(alice, "6543560920");
/* Get by TMSI */
- snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi);
+ snprintf(scratch_str, sizeof(scratch_str), "0x%08x", alice->tmsi);
alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str);
COMPARE(alice, alice_db);
SUBSCR_PUT(alice_db);
diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c
index 781ef6147..8ed57ca17 100644
--- a/openbsc/tests/gsm0408/gsm0408_test.c
+++ b/openbsc/tests/gsm0408/gsm0408_test.c
@@ -93,7 +93,7 @@ static void test_mi_functionality(void)
/* tmsi code */
mi_len = gsm48_generate_mid_from_tmsi(mi, tmsi);
gsm48_mi_to_string(mi_parsed, sizeof(mi_parsed), mi + 2, mi_len - 2);
- COMPARE((uint32_t)strtoul(mi_parsed, NULL, 10), ==, tmsi);
+ COMPARE((uint32_t)tmsi_from_string(mi_parsed), ==, tmsi);
/* imsi code */
mi_len = gsm48_generate_mid_from_imsi(mi, imsi_odd);