Bluetooth: Fix various coding style issues

Change-Id: Iffcc0db1dca5eba16ce10039d918175e72ac8f2f
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-07-08 11:00:13 +03:00 committed by Anas Nashif
commit 636415212a
2 changed files with 5 additions and 7 deletions

View file

@ -338,7 +338,6 @@ void bt_conn_set_state(struct bt_conn *conn, bt_conn_state_t state)
case BT_CONN_CONNECT_SCAN:
case BT_CONN_CONNECT:
case BT_CONN_DISCONNECT:
break;
default:
BT_WARN("no valid (%u) state was set\n", state);
@ -352,11 +351,9 @@ struct bt_conn *bt_conn_lookup_handle(uint16_t handle)
int i;
for (i = 0; i < ARRAY_SIZE(conns); i++) {
switch (conns[i].state) {
case BT_CONN_CONNECTED:
case BT_CONN_DISCONNECT:
break;
default:
/* We only care about connections with a valid handle */
if (conns[i].state != BT_CONN_CONNECTED &&
conns[i].state != BT_CONN_DISCONNECT) {
continue;
}

View file

@ -642,7 +642,7 @@ static int bt_hci_stop_scanning(void)
scan_enable->filter_dup = 0x00;
scan_enable->enable = BT_LE_SCAN_DISABLE;
err = bt_hci_cmd_send_sync(BT_HCI_OP_LE_SET_SCAN_ENABLE, buf, &rsp);
err = bt_hci_cmd_send_sync(BT_HCI_OP_LE_SET_SCAN_ENABLE, buf, &rsp);
if (err) {
return err;
}
@ -722,6 +722,7 @@ static void le_conn_complete(struct bt_buf *buf)
if (!conn) {
return;
}
bt_conn_set_state(conn, BT_CONN_DISCONNECTED);
/* Drop the reference got by lookup call in CONNECT state.