diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2014-02-09 20:59:11 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-02-14 16:39:30 -0500 |
commit | 4339c25afb0d49878fba5a989618ffe807aa46cd (patch) | |
tree | b1333750a53c081e672b55185e0b8eb933877cc7 | |
parent | c10a848cea89a8f0418fa0efec33c4e8507aab4b (diff) |
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>
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index b378bbb6f8a7..e8898624cbaf 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -1968,12 +1968,11 @@ static void rfcomm_process_sessions(void) | |||
1968 | continue; | 1968 | continue; |
1969 | } | 1969 | } |
1970 | 1970 | ||
1971 | if (s->state == BT_LISTEN) { | 1971 | switch (s->state) { |
1972 | case BT_LISTEN: | ||
1972 | rfcomm_accept_connection(s); | 1973 | rfcomm_accept_connection(s); |
1973 | continue; | 1974 | continue; |
1974 | } | ||
1975 | 1975 | ||
1976 | switch (s->state) { | ||
1977 | case BT_BOUND: | 1976 | case BT_BOUND: |
1978 | s = rfcomm_check_connection(s); | 1977 | s = rfcomm_check_connection(s); |
1979 | break; | 1978 | break; |