Merge branch 'bugfix/btdm_uuid_convert' into 'master'

component/bt : fix uuid convert warning

See merge request !857
This commit is contained in:
Jiang Jiang Jian 2017-06-13 21:03:55 +08:00
commit 12c1238730

View File

@ -100,8 +100,10 @@ void btc_to_bta_uuid(tBT_UUID *p_dest, esp_bt_uuid_t *p_src)
p_dest->uu.uuid32 = p_src->uuid.uuid32;
} else if (p_src->len == LEN_UUID_128) {
memcpy(&p_dest->uu.uuid128, p_src->uuid.uuid128, p_dest->len);
} else if (p_src->len == 0) {
/* do nothing for now, there's some scenario will input 0 */
} else {
LOG_ERROR("%s UUID len is invalid %d\n", __func__, p_dest->len);
LOG_ERROR("%s UUID len is invalid %d\n", __func__, p_src->len);
}
}
@ -130,8 +132,11 @@ void bta_to_btc_uuid(esp_bt_uuid_t *p_dest, tBT_UUID *p_src)
p_dest->uuid.uuid32 = p_src->uu.uuid32;
} else if (p_src->len == LEN_UUID_128) {
memcpy(&p_dest->uuid.uuid128, p_src->uu.uuid128, p_dest->len);
} else if (p_src->len == 0) {
/* do nothing for now, there's some scenario will input 0
such as, receive notify, the descriptor may be 0 */
} else {
LOG_ERROR("%s UUID len is invalid %d\n", __func__, p_dest->len);
LOG_ERROR("%s UUID len is invalid %d\n", __func__, p_src->len);
}
}