diff --git a/src/add-ons/kernel/bluetooth/btCoreData/BTCoreData.cpp b/src/add-ons/kernel/bluetooth/btCoreData/BTCoreData.cpp index 12c67f79d9..1a3605fb62 100644 --- a/src/add-ons/kernel/bluetooth/btCoreData/BTCoreData.cpp +++ b/src/add-ons/kernel/bluetooth/btCoreData/BTCoreData.cpp @@ -21,14 +21,14 @@ net_buffer_module_info* gBufferModule = NULL; inline bool ExistConnectionByDestination(const bdaddr_t& destination, hci_id hid = -1) { - return (ConnectionByDestination(destination, hid) != NULL); + return ConnectionByDestination(destination, hid) != NULL; } inline bool ExistConnectionByHandle(uint16 handle, hci_id hid) { - return (ConnectionByHandle(handle, hid)); + return ConnectionByHandle(handle, hid); } diff --git a/src/add-ons/kernel/bluetooth/btCoreData/ChannelInterface.cpp b/src/add-ons/kernel/bluetooth/btCoreData/ChannelInterface.cpp index 19b1840992..5b2ecfc2f3 100644 --- a/src/add-ons/kernel/bluetooth/btCoreData/ChannelInterface.cpp +++ b/src/add-ons/kernel/bluetooth/btCoreData/ChannelInterface.cpp @@ -35,12 +35,12 @@ ChannelBySourceID(HciConnection *conn, uint16 scid) uint16 ChannelAllocateCid(HciConnection* conn) { - uint16 cid = conn->lastCid ; + uint16 cid = conn->lastCid; debugf("Starting search cid %d\n",cid); do { - cid = (cid == L2CAP_LAST_CID)?L2CAP_FIRST_CID : cid + 1; + cid = (cid == L2CAP_LAST_CID) ? L2CAP_FIRST_CID : cid + 1; - if(ChannelBySourceID(conn, cid) == NULL) { + if (ChannelBySourceID(conn, cid) == NULL) { conn->lastCid = cid; return cid; } @@ -54,7 +54,7 @@ ChannelAllocateCid(HciConnection* conn) uint16 ChannelAllocateIdent(HciConnection* conn) { - uint8 ident = conn->lastIdent + 1; + uint8 ident = conn->lastIdent + 1; if (ident < L2CAP_FIRST_IDENT) ident = L2CAP_FIRST_IDENT; @@ -66,7 +66,7 @@ ChannelAllocateIdent(HciConnection* conn) return ident; } - ident ++; + ident++; if (ident < L2CAP_FIRST_IDENT) ident = L2CAP_FIRST_IDENT; } @@ -82,7 +82,7 @@ AddChannel(HciConnection* conn, uint16 psm) if (channel == NULL) { flowf ("no mem for channel"); - return (NULL); + return NULL; } /* Get a new Source CID */ @@ -110,7 +110,7 @@ AddChannel(HciConnection* conn, uint16 psm) channel = NULL; } - return (channel); + return channel; } diff --git a/src/add-ons/kernel/bluetooth/hci/bluetooth.cpp b/src/add-ons/kernel/bluetooth/hci/bluetooth.cpp index 4687a87b0c..fc7a818a80 100644 --- a/src/add-ons/kernel/bluetooth/hci/bluetooth.cpp +++ b/src/add-ons/kernel/bluetooth/hci/bluetooth.cpp @@ -259,9 +259,10 @@ RegisterDriver(bt_hci_transport_hooks* hooks, bluetooth_device** _device) if (sDeviceList.IsEmpty()) device->index = HCI_DEVICE_INDEX_OFFSET; // REVIEW: dev index - else + else { device->index = (sDeviceList.Tail())->index + 1; // REVIEW! flowf("List not empty\n"); + } sDeviceList.Add(device);