fixeria submitted this change.

View Change


Approvals: laforge: Looks good to me, but someone else must approve daniel: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved
osmo-bts-trx: use BPLEN macro instead of magic numbers

Change-Id: I7d89b2e50c7eeb54b734c4959eeeb1c63a51a315
---
M src/osmo-bts-trx/sched_lchan_xcch.c
1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/osmo-bts-trx/sched_lchan_xcch.c b/src/osmo-bts-trx/sched_lchan_xcch.c
index b36f4e8..a1a5e30 100644
--- a/src/osmo-bts-trx/sched_lchan_xcch.c
+++ b/src/osmo-bts-trx/sched_lchan_xcch.c
@@ -38,7 +38,7 @@
/* Add two arrays of sbits */
static void add_sbits(sbit_t *current, const sbit_t *previous)
{
- for (unsigned int i = 0; i < 464; i++)
+ for (unsigned int i = 0; i < BPLEN * 4; i++)
current[i] = current[i] / 2 + previous[i] / 2;
}

@@ -67,7 +67,7 @@

/* clear burst & store frame number of first burst */
if (bi->bid == 0) {
- memset(bursts_p, 0, 464);
+ memset(bursts_p, 0, BPLEN * 4);
*mask = 0x0;
*first_fn = bi->fn;
}
@@ -138,7 +138,7 @@

/* Keep a copy to ease decoding in the next repetition pass */
if (rep_sacch)
- memcpy(chan_state->ul_bursts_prev, bursts_p, 464);
+ memcpy(chan_state->ul_bursts_prev, bursts_p, BPLEN * 4);

return _sched_compose_ph_data_ind(l1ts, *first_fn, bi->chan,
&l2[0], l2_len,

To view, visit change 35010. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7d89b2e50c7eeb54b734c4959eeeb1c63a51a315
Gerrit-Change-Number: 35010
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-MessageType: merged