[PATCH] osmo-bts[master]: l1sap: Fix Code maintainability issues (missing else if)

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
Mon Jan 16 17:44:59 UTC 2017


Review at  https://gerrit.osmocom.org/1614

l1sap: Fix Code maintainability issues (missing else if)

In calc_exprd_rach_frames() the if-tree which selects ccch_conf is
improperly set up. (if where an else if whould be required) This
patch fixes that.

See also coverity-scan CID 160156 and CID 160155.

Change-Id: I88ed1b3e59213acdf97f88eda097b8172b952a5e
---
M src/common/l1sap.c
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 0ce1e4a..9116e23 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -381,9 +381,9 @@
 		 * See also TS 04.08, Chapter 10.5.2.11, table 10.29 */
 		if (ccch_conf == RSL_BCCH_CCCH_CONF_2_NC)
 			rach_frames_expired = 2;
-		if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC)
+		else if (ccch_conf == RSL_BCCH_CCCH_CONF_3_NC)
 			rach_frames_expired = 3;
-		if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC)
+		else if (ccch_conf == RSL_BCCH_CCCH_CONF_4_NC)
 			rach_frames_expired = 4;
 		else
 			rach_frames_expired = 1;

-- 
To view, visit https://gerrit.osmocom.org/1614
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88ed1b3e59213acdf97f88eda097b8172b952a5e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list