提交 4339c25a 编写于 作者: P Peter Hurley 提交者: 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: NPeter Hurley <peter@hurleysoftware.com>
Tested-By: NAlexander Holler <holler@ahsoftware.de>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册