gtphub: fix number map range for TEIs.
Use unsigned int for nr_map, just large enough to fit the TEI space.
Adjust log output formats and casts accordingly.
Fixes: TEIs are uint32_t, but the nr_map so far used int. This would cause TEIs
from 0x80000000 on to be handled and printed as a negative value.
Sponsored-by: On-Waves ehi
diff --git a/openbsc/tests/gtphub/gtphub_test.c b/openbsc/tests/gtphub/gtphub_test.c
index 12c9d78..2fa28c2 100644
--- a/openbsc/tests/gtphub/gtphub_test.c
+++ b/openbsc/tests/gtphub/gtphub_test.c
@@ -233,9 +233,9 @@
size_t len = sizeof(buf);
struct nr_mapping *m;
llist_for_each_entry(m, &map->mappings, entry) {
- size_t wrote = snprintf(pos, len, "(%d->%d@%d), ",
- (int)m->orig,
- (int)m->repl,
+ size_t wrote = snprintf(pos, len, "(%u->%u@%d), ",
+ m->orig,
+ m->repl,
(int)m->expiry_entry.expiry);
OSMO_ASSERT(wrote < len);
pos += wrote;