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
This commit is contained in:
Stefan Sperling 2018-11-15 15:35:42 +01:00 committed by Harald Welte
parent cec88f116e
commit 57465714bd
1 changed files with 2 additions and 0 deletions

View File

@ -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: