dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31127 )
Change subject: pcu_sock: use ARRAY_SIZE rather then magic number ......................................................................
pcu_sock: use ARRAY_SIZE rather then magic number
Lets use ARRAY_SIZE instead of magic number (8) to determine the number of timeslots to iterate.
Change-Id: I0e016e6fff420851dfabebef5d8d43c735b968b2 --- M src/common/pcu_sock.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index b7ec048..8f8b3af 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -203,7 +203,7 @@ return; }
- for (tn = 0; tn < 8; tn++) { + for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) { const struct gsm_bts_trx_ts *ts = &trx->ts[tn];
if (ts->mo.nm_state.operational != NM_OPSTATE_ENABLED)