bluedroid: fixed compile warning when optimize for performance

This commit is contained in:
chenjianhua 2023-06-11 15:54:38 +08:00
parent b4494e6a11
commit 2a9ded6195
2 changed files with 3 additions and 2 deletions

View File

@ -133,7 +133,7 @@ typedef union {
} search_res; /*!< Gatt client callback param of ESP_GATTC_SEARCH_RES_EVT */
/**
* @brief ESP_GATTC_READ_CHAR_EVT, ESP_GATTC_READ_DESCR_EVT
* @brief ESP_GATTC_READ_CHAR_EVT, ESP_GATTC_READ_DESCR_EVT, ESP_GATTC_READ_MULTIPLE_EVT, ESP_GATTC_READ_MULTI_VAR_EVT
*/
struct gattc_read_char_evt_param {

View File

@ -86,7 +86,8 @@ static void btc_gap_ble_get_dev_name_callback(UINT8 status, char *name)
param.get_dev_name_cmpl.status = btc_btm_status_to_esp_status(status);
param.get_dev_name_cmpl.name = (char *)osi_malloc(BTC_MAX_LOC_BD_NAME_LEN + 1);
if (param.get_dev_name_cmpl.name) {
BCM_STRNCPY_S(param.get_dev_name_cmpl.name, name, BTC_MAX_LOC_BD_NAME_LEN + 1);
BCM_STRNCPY_S(param.get_dev_name_cmpl.name, name, BTC_MAX_LOC_BD_NAME_LEN);
param.get_dev_name_cmpl.name[BTC_MAX_LOC_BD_NAME_LEN] = '\0';
} else {
param.get_dev_name_cmpl.status = ESP_BT_STATUS_NOMEM;
}