Commit 4339c25a authored by Peter Hurley's avatar Peter Hurley Committed by Marcel Holtmann

Bluetooth: Simplify RFCOMM session state eval

Merge conditional test for BT_LISTEN session state into following
switch statement (which is functionally equivalent).
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Tested-By: default avatarAlexander Holler <holler@ahsoftware.de>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent c10a848c
...@@ -1968,12 +1968,11 @@ static void rfcomm_process_sessions(void) ...@@ -1968,12 +1968,11 @@ static void rfcomm_process_sessions(void)
continue; continue;
} }
if (s->state == BT_LISTEN) { switch (s->state) {
case BT_LISTEN:
rfcomm_accept_connection(s); rfcomm_accept_connection(s);
continue; continue;
}
switch (s->state) {
case BT_BOUND: case BT_BOUND:
s = rfcomm_check_connection(s); s = rfcomm_check_connection(s);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment