fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/35009?usp=email )
Change subject: osmo-bts-trx: add_sbits(): simplify, improve coding style ......................................................................
osmo-bts-trx: add_sbits(): simplify, improve coding style
Change-Id: I518a8ea268a9a6d48b04c291a03e5efbed5f571d --- M src/osmo-bts-trx/sched_lchan_xcch.c 1 file changed, 12 insertions(+), 7 deletions(-)
Approvals: daniel: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved
diff --git a/src/osmo-bts-trx/sched_lchan_xcch.c b/src/osmo-bts-trx/sched_lchan_xcch.c index ccf685f..b36f4e8 100644 --- a/src/osmo-bts-trx/sched_lchan_xcch.c +++ b/src/osmo-bts-trx/sched_lchan_xcch.c @@ -36,14 +36,10 @@ #include <sched_utils.h>
/* Add two arrays of sbits */ -static void add_sbits(sbit_t * current, const sbit_t * previous) +static void add_sbits(sbit_t *current, const sbit_t *previous) { - unsigned int i; - for (i = 0; i < 464; i++) { - *current = (*current) / 2 + (*previous) / 2; - current++; - previous++; - } + for (unsigned int i = 0; i < 464; i++) + current[i] = current[i] / 2 + previous[i] / 2; }
/*! \brief a single (SDCCH/SACCH) burst was received by the PHY, process it */