From c37fd8898526dfeac3da620ddb4d2ad701c1fffd Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 16 Jan 2017 18:36:24 +0100 Subject: l1sap: fix missing 'else's causing wrong rach frame expiry counts This bug was introduced in the recently merged commit 1e399f888e4e1c93e0e5b7fd69fce09a2587fb87 aka change-id I87f40f5f160a4f6750c4f3d06997fc4f24049303 Fixes: coverity-scan CID#160156 and CID#160155 Change-Id: I88ed1b3e59213acdf97f88eda097b8172b952a5e --- src/common/l1sap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 0ce1e4a0..9116e23f 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -381,9 +381,9 @@ static unsigned int calc_exprd_rach_frames(struct gsm_bts *bts, uint32_t fn) * 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; -- cgit v1.2.3