component/bt : fix a code bug

This commit is contained in:
Tian Hao 2016-12-01 12:14:57 +08:00
parent 1abf2c4ed7
commit 281a9c2761

View file

@ -1353,11 +1353,10 @@ tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p
BOOLEAN BTM_BleSetRandAddress(BD_ADDR rand_addr) BOOLEAN BTM_BleSetRandAddress(BD_ADDR rand_addr)
{ {
BOOLEAN set_flag = false; BOOLEAN set_flag = false;
UINT8 len = sizeof(rand_addr);
if (len != BD_ADDR_LEN) { if (rand_addr == NULL)
APPL_TRACE_ERROR("Invalid random adress"); return set_flag;
return false;
}
//send the set random address to the controller //send the set random address to the controller
set_flag = btsnd_hcic_ble_set_random_addr(rand_addr); set_flag = btsnd_hcic_ble_set_random_addr(rand_addr);
return set_flag; return set_flag;