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

Commit 80359a58 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "btif:: Const-ify deep copy callbacks"

parents bae7901f a9c8f294
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ enum {
 ******************************************************************************/

typedef void(tBTIF_CBACK)(uint16_t event, char* p_param);
typedef void(tBTIF_COPY_CBACK)(uint16_t event, char* p_dest, char* p_src);
typedef void(tBTIF_COPY_CBACK)(uint16_t event, char* p_dest, const char* p_src);

/*******************************************************************************
 *  Type definitions and return values
+2 −2
Original line number Diff line number Diff line
@@ -84,9 +84,9 @@ extern const btgatt_callbacks_t* bt_gatt_callbacks;
 ******************************************************************************/

static void btapp_gatts_copy_req_data(uint16_t event, char* p_dest,
                                      char* p_src) {
                                      const char* p_src) {
  tBTA_GATTS* p_dest_data = (tBTA_GATTS*)p_dest;
  tBTA_GATTS* p_src_data = (tBTA_GATTS*)p_src;
  const tBTA_GATTS* p_src_data = (const tBTA_GATTS*)p_src;

  if (!p_src_data || !p_dest_data) return;

+2 −2
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ static tBTA_HD_APP_INFO app_info;
static tBTA_HD_QOS_INFO in_qos;
static tBTA_HD_QOS_INFO out_qos;

static void intr_data_copy_cb(uint16_t event, char* p_dst, char* p_src) {
static void intr_data_copy_cb(uint16_t event, char* p_dst, const char* p_src) {
  tBTA_HD_INTR_DATA* p_dst_data = (tBTA_HD_INTR_DATA*)p_dst;
  tBTA_HD_INTR_DATA* p_src_data = (tBTA_HD_INTR_DATA*)p_src;
  uint8_t* p_data;
@@ -84,7 +84,7 @@ static void intr_data_copy_cb(uint16_t event, char* p_dst, char* p_src) {
  p_dst_data->p_data = p_data;
}

static void set_report_copy_cb(uint16_t event, char* p_dst, char* p_src) {
static void set_report_copy_cb(uint16_t event, char* p_dst, const char* p_src) {
  tBTA_HD_SET_REPORT* p_dst_data = (tBTA_HD_SET_REPORT*)p_dst;
  tBTA_HD_SET_REPORT* p_src_data = (tBTA_HD_SET_REPORT*)p_src;
  uint8_t* p_data;
+1 −1
Original line number Diff line number Diff line
@@ -1143,7 +1143,7 @@ static void btif_hh_upstreams_evt(uint16_t event, char* p_param) {
 ******************************************************************************/

static void btif_hh_hsdata_rpt_copy_cb(uint16_t event, char* p_dest,
                                       char* p_src) {
                                       const char* p_src) {
  tBTA_HH_HSDATA* p_dst_data = (tBTA_HH_HSDATA*)p_dest;
  tBTA_HH_HSDATA* p_src_data = (tBTA_HH_HSDATA*)p_src;
  BT_HDR* hdr;
+2 −1
Original line number Diff line number Diff line
@@ -76,7 +76,8 @@ static void btif_sdp_search_comp_evt(uint16_t event, char* p_param) {
            evt_data->records);
}

static void sdp_search_comp_copy_cb(uint16_t event, char* p_dest, char* p_src) {
static void sdp_search_comp_copy_cb(uint16_t event, char* p_dest,
                                    const char* p_src) {
  tBTA_SDP_SEARCH_COMP* p_dest_data = (tBTA_SDP_SEARCH_COMP*)p_dest;
  tBTA_SDP_SEARCH_COMP* p_src_data = (tBTA_SDP_SEARCH_COMP*)p_src;

Loading