Change in osmo-bts[master]: measurement: remove over-defensive checks in is_meas_complete()

fixeria gerrit-no-reply at lists.osmocom.org
Thu Jun 3 01:04:51 UTC 2021


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


Change subject: measurement: remove over-defensive checks in is_meas_complete()
......................................................................

measurement: remove over-defensive checks in is_meas_complete()

The timeslot number ts->nr is set in gsm_bts_trx_alloc() and can
never be greater than 7.  Regarding the physical channel type
returned by ts_pchan(), it's also unlikely to be greater than
_GSM_PCHAN_MAX.

Change-Id: I6d20d7cba49cc8b6d1dc2192598ca372b7d2c5bf
---
M src/common/measurement.c
1 file changed, 0 insertions(+), 5 deletions(-)



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

diff --git a/src/common/measurement.c b/src/common/measurement.c
index 03afaa3..b586987 100644
--- a/src/common/measurement.c
+++ b/src/common/measurement.c
@@ -250,11 +250,6 @@
 	int rc = 0;
 	enum gsm_phys_chan_config pchan = ts_pchan(lchan->ts);
 
-	if (lchan->ts->nr >= 8)
-		return -EINVAL;
-	if (pchan >= _GSM_PCHAN_MAX)
-		return -EINVAL;
-
 	switch (pchan) {
 	case GSM_PCHAN_TCH_F:
 		fn_mod = translate_tch_meas_rep_fn104(fn % 104);

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I6d20d7cba49cc8b6d1dc2192598ca372b7d2c5bf
Gerrit-Change-Number: 24527
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210603/c349f4fc/attachment.htm>


More information about the gerrit-log mailing list