pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30631 )
Change subject: bts: Adapt trx check based on bts->trx[] defined array size ......................................................................
bts: Adapt trx check based on bts->trx[] defined array size
This way the code is not hardcoded to 8 TRX.
Related: OS#5827 Change-Id: I5ccb5ec27bc189d17c62e7f2a59fae0b3bddf8e3 --- M src/bts.cpp 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved
diff --git a/src/bts.cpp b/src/bts.cpp index 06ac5a7..cf39aa4 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -632,7 +632,7 @@ unsigned int best_cnt = 0; uint8_t best_first_tfi = 0;
- if (use_trx >= 0 && use_trx < 8) + if (use_trx >= 0 && use_trx < (int8_t)ARRAY_SIZE(bts->trx)) trx_from = trx_to = use_trx; else { trx_from = 0;