Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad9fb255 authored by Chris Manton's avatar Chris Manton
Browse files

Const-ify size tBTM_CB::tBTM_BLE_CB::link_count[]

Towards readable code

Bug: 163134718
Tag: #refactor
Test: acts -tc BleCocTest
Test: ble paired 2 phones

Change-Id: I7d4e5e40600fc264fc30f51bb5a7fd1ebca7636d
parent 3d266472
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -224,6 +224,7 @@ typedef uint8_t tBTM_PRIVACY_MODE;
*/
constexpr uint8_t kBTM_BLE_INQUIRY_ACTIVE = 0x10;
constexpr uint8_t kBTM_BLE_OBSERVE_ACTIVE = 0x80;
constexpr size_t kMasterAndSlaveCount = 2;

typedef struct {
 private:
@@ -299,7 +300,9 @@ typedef struct {

  /* current BLE link state */
  tBTM_BLE_STATE_MASK cur_states; /* bit mask of tBTM_BLE_STATE */
  uint8_t link_count[2];          /* total link count master and slave*/

  uint8_t
      link_count[kMasterAndSlaveCount]; /* total link count master and slave*/
} tBTM_BLE_CB;

#endif  // BTM_BLE_INT_TYPES_H