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: Peter Hurley <peter@hurleysoftware.com>
Tested-By: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Peter Hurley 2014-02-09 20:59:11 -05:00 коммит произвёл Marcel Holtmann
Родитель c10a848cea
Коммит 4339c25afb
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

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