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

Commit 727b85d6 authored by Chris Manton's avatar Chris Manton
Browse files

Remove unused function stack/smp/smp_utils::smp_reverse_array

Toward readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I5526214a9aae5db40a93c396773c2789aa6b85b0
parent 99d92c3d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -454,7 +454,6 @@ extern bool smp_command_has_invalid_length(tSMP_CB* p_cb);
extern bool smp_command_has_invalid_parameters(tSMP_CB* p_cb);
extern void smp_reject_unexpected_pairing_command(const RawAddress& bd_addr);
extern tSMP_ASSO_MODEL smp_select_association_model(tSMP_CB* p_cb);
extern void smp_reverse_array(uint8_t* arr, uint8_t len);
extern uint8_t smp_calculate_random_input(uint8_t* random, uint8_t round);
extern void smp_collect_local_io_capabilities(uint8_t* iocap, tSMP_CB* p_cb);
extern void smp_collect_peer_io_capabilities(uint8_t* iocap, tSMP_CB* p_cb);
+0 −18
Original line number Diff line number Diff line
@@ -1317,24 +1317,6 @@ tSMP_ASSO_MODEL smp_select_association_model_secure_connections(tSMP_CB* p_cb) {
  return model;
}

/*******************************************************************************
 * Function         smp_reverse_array
 *
 * Description      This function reverses array bytes
 *
 ******************************************************************************/
void smp_reverse_array(uint8_t* arr, uint8_t len) {
  uint8_t i = 0, tmp;

  SMP_TRACE_DEBUG("smp_reverse_array");

  for (i = 0; i < len / 2; i++) {
    tmp = arr[i];
    arr[i] = arr[len - 1 - i];
    arr[len - 1 - i] = tmp;
  }
}

/*******************************************************************************
 * Function         smp_calculate_random_input
 *