summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-12 18:26:08 +0700
committerfixeria <vyanitskiy@sysmocom.de>2020-09-14 09:04:39 +0000
commitcc4e149a2f655b65ec61164e9c14687f482970ef (patch)
treea7428e634270b5a831f8d3c92644b01bfd9ff2da
parent9308cd665d8922bbc94dc805af04d52f935a483b (diff)
BTS_Tests: simplify MA length calculation in f_resolve_fh_params()
-rw-r--r--bts/BTS_Tests.ttcn4
1 files changed, 1 insertions, 3 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 58b2213..ac781f6 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -547,9 +547,7 @@ friend function f_resolve_fh_params(inout ConnHdlrPars pars, uint8_t trx_nr := 0
if (ispresent(pars.maio_hsn)) {
/* Prepare the Mobile Allocation bitmask (length & padding) */
- pars.ma_map.len := mp_transceiver_num / 8;
- if (mp_transceiver_num mod 8 > 0)
- { pars.ma_map.len := pars.ma_map.len + 1; }
+ pars.ma_map.len := (mp_transceiver_num + 8 - 1) / 8; /* in bytes */
pars.ma_map.ma := f_pad_bit('0'B, pars.ma_map.len * 8, '0'B);
/* Compose the actual Mobile Allocation and the bitmask */