From 27c07690d9ece5c8e752a40b5276934bfa1326e3 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 19 May 2021 02:28:26 +0200 Subject: replace ts_*_for_each_lchan() with ts_for_n_lchans() So far we have a couple of macros iterating a specific number of lchans, depending on dynamic timeslot state etc. With addition of VAMOS lchans, this would become more complex and bloated. Instead of separate iteration macros for each situation, only have one that takes a number of lchans as argument. That allows to more clearly pick the number of lchans, especially for non-trivial VAMOS scenarios. Related: SYS#5315 OS#4940 Change-Id: Ib2c6baf73a81ba371143ba5adc912aef6f79238d --- tests/handover/handover_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index 006e7910c..e65392038 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -463,7 +463,8 @@ static void lchan_clear(struct gsm_lchan *lchan) static void ts_clear(struct gsm_bts_trx_ts *ts) { struct gsm_lchan *lchan; - ts_for_each_lchan(lchan, ts) { + + ts_for_n_lchans(lchan, ts, ts->max_lchans_possible) { if (lchan_state_is(lchan, LCHAN_ST_UNUSED)) continue; lchan_clear(lchan); -- cgit v1.2.3