From cc4e149a2f655b65ec61164e9c14687f482970ef Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sat, 12 Sep 2020 18:26:08 +0700 Subject: BTS_Tests: simplify MA length calculation in f_resolve_fh_params() Change-Id: I13f1d45162b520eff0d2e9823604fda85b71970b Related: SYS#4868, OS#4708 --- bts/BTS_Tests.ttcn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 58b2213c..ac781f65 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 */ -- cgit v1.2.3