From d000d80968ce6292d6715008ed803ec1f41b6a10 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 20 Sep 2017 17:55:28 +0200 Subject: Simplify TS alloc: use defines for constants * define and use constant for occupied TFI instead copying the same magic number all over the place * use libosmocore's define for bit pretty-printer Change-Id: I2699ceebf0cbec01652a02fa68ccc9e9419d0293 Related: OS#2282 --- tests/alloc/AllocTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index 6e344dcb..1c98e462 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -585,17 +585,17 @@ static unsigned alloc_many_tbfs(BTS *the_bts, unsigned min_class, continue; if (ul_tbf && - pdch->assigned_tfi(GPRS_RLCMAC_DL_TBF) != 0xffffffff) + pdch->assigned_tfi(GPRS_RLCMAC_DL_TBF) != NO_FREE_TFI) continue; if (dl_tbf && - pdch->assigned_tfi(GPRS_RLCMAC_UL_TBF) != 0xffffffff) + pdch->assigned_tfi(GPRS_RLCMAC_UL_TBF) != NO_FREE_TFI) continue; busy_slots |= 1 << i; } - printf(" TBF[%d] class %d reserves %c%c%c%c%c%c%c%c\n", + printf(" TBF[%d] class %d reserves " OSMO_BIT_SPEC "\n", tfi, ms_class, get_dir_char(0x01, ul_slots, dl_slots, busy_slots), get_dir_char(0x02, ul_slots, dl_slots, busy_slots), -- cgit v1.2.3