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

fixeria gerrit-no-reply at lists.osmocom.org
Wed Jun 9 15:36:25 UTC 2021


fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/24527 )

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


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bts/+/24527/1/src/common/measurement.c 
File src/common/measurement.c:

https://gerrit.osmocom.org/c/osmo-bts/+/24527/1/src/common/measurement.c@a257 
PS1, Line 257: 
> but what's the point of removing these checks? optimization?!?

This part of the code is executed quite often, so yes, it's a bad idea to check for all theoretically possible values here.

> ts_pchan() mostly returns ts->pchan, who knows what's in there.

Then it would make sense to assert() in ts_pchan() itself, but I still don't see why would we need that. Even if ts_pchan() returns garbage, the switch statement below will jump to the default branch.



-- 
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: neels <nhofmeyr at sysmocom.de>
Gerrit-Comment-Date: Wed, 09 Jun 2021 15:36:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210609/aa992363/attachment.htm>


More information about the gerrit-log mailing list