aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-10-08 21:16:22 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2020-10-08 21:21:35 +0200
commit1ebc0422d66c23be9294d2dc243dcba62f31ecd4 (patch)
tree4f9d5cf0bbaae0b22166e672f457804322331ad4
parenta33ef3ae2bc6d52f3338328c7d7288b51c755df0 (diff)
gsm_08_08: fix unreachable code in parse_powercap()
The function parse_powercap() contains a nested switch case statement that is used to populate the variables lu and pwr_lev. Those variables are used at the bottom of the function later. Unfortunately the (outer) switch case that consumes the pdisc variable does not put a break; at the end of its only case "GSM48_PDISC_MM", which eventually causes a fall through to the default case, which simply returns. Since this can not be intended, lets add a break to make the bottom code reachable in case lu and pwr_lev are successfully populated. Change-Id: I48331cca784d8fa3a5904f2c4cf1555622b319e8 Fixes: CID#214886
-rw-r--r--src/osmo-bsc/gsm_08_08.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c
index f3214c7db..b7c744865 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -343,6 +343,7 @@ static void parse_powercap(struct gsm_subscriber_connection *conn, struct msgb *
/* No power cap in other messages */
return;
}
+ break;
/* FIXME: pwr_lev in Paging Response? */
default:
/* No power cap in other messages */