aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-11-15 15:35:42 +0100
committerHarald Welte <laforge@gnumonks.org>2018-11-18 20:44:57 +0000
commit57465714bd13961d21598512de0a3db00594e138 (patch)
treeb1060ee2e393add1deae3b888aae2a1a6604cf3c
parentcec88f116e57311c3795256a551edeeb67019978 (diff)
add missing 'break' in switch statement
Coverity points out that abis_nm_rcvmsg_sw() contains a switch statement with suspicious looking missing break statements. It is unclear to me if the code intends to process some types of messages in more than one state, or of all messages which affect a particular state already appear in the state's corresponding switch block. Can someone else tell what is supposed to happen here? If this code is falling through intentionally, I will suggest a patch adding /* fallthrough */ comments for clarity. Change-Id: I1ea4221fadf30074156e9d17d94a5cb065242584 Related: CID#57703 Related: CID#57704
-rw-r--r--src/osmo-bsc/abis_nm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index 8f5a51455..c1a26ac7f 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -1463,6 +1463,7 @@ static int abis_nm_rcvmsg_sw(struct msgb *mb)
abis_nm_queue_send_next(sign_link->trx->bts);
break;
}
+ break;
case SW_STATE_WAIT_ACTACK:
switch (foh->msg_type) {
case NM_MT_ACTIVATE_SW_ACK:
@@ -1487,6 +1488,7 @@ static int abis_nm_rcvmsg_sw(struct msgb *mb)
abis_nm_queue_send_next(sign_link->trx->bts);
break;
}
+ break;
case SW_STATE_NONE:
switch (foh->msg_type) {
case NM_MT_ACTIVATE_SW_ACK: