Skip to content

Commit

Permalink
Bluetooth: Simplify RFCOMM session state eval
Browse files Browse the repository at this point in the history
Merge conditional test for BT_LISTEN session state into following
switch statement (which is functionally equivalent).

Signed-off-by: Peter Hurley <[email protected]>
Tested-By: Alexander Holler <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
peterhurley authored and holtmann committed Feb 14, 2014
1 parent c10a848 commit 4339c25
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/bluetooth/rfcomm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1968,12 +1968,11 @@ static void rfcomm_process_sessions(void)
continue;
}

if (s->state == BT_LISTEN) {
switch (s->state) {
case BT_LISTEN:
rfcomm_accept_connection(s);
continue;
}

switch (s->state) {
case BT_BOUND:
s = rfcomm_check_connection(s);
break;
Expand Down

0 comments on commit 4339c25

Please sign in to comment.