Change in osmo-bts[master]: sched_lchan_tchh: initialize meas_avg with zeros

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Fri Sep 25 13:49:36 UTC 2020


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/20282 )


Change subject: sched_lchan_tchh: initialize meas_avg with zeros
......................................................................

sched_lchan_tchh: initialize meas_avg with zeros

in function rx_tchh_fn() the variable meas_avg is not initalized. This
is not always a problem, since most of the time trx_sched_meas_avg() is
populating the variable properly. In cases where a FACCH is transmitted
(chan_state->ul_ongoing_facch = true) the variable is left unpopulated.
In order to have at least stable values for those cases, make sure that
meas_avg contains zeros in the beginning.

Change-Id: I5c3c1c41d22f9edaaf6bd4478dd04f090dca12a9
Fixes: CID#214480
---
M src/osmo-bts-trx/sched_lchan_tchh.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/82/20282/1

diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 2a561e1..75aeec4 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -66,7 +66,7 @@
 	 */
 	int fn_is_odd = (((bi->fn + 26 - 10) % 26) >> 2) & 1;
 	enum sched_meas_avg_mode meas_avg_mode = SCHED_MEAS_AVG_M_QUAD;
-	struct l1sched_meas_set meas_avg;
+	struct l1sched_meas_set meas_avg = { };
 	unsigned int fn_begin;
 	uint16_t ber10k;
 	uint8_t is_sub = 0;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20282
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I5c3c1c41d22f9edaaf6bd4478dd04f090dca12a9
Gerrit-Change-Number: 20282
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200925/3765dadf/attachment.htm>


More information about the gerrit-log mailing list