Bluetooth: Use bt_addr_le_copy() instead of direct assignment

The convention in the code is to use the appropriate address copying
functions instead of direct assignments. Even when a specific copying
function doesn't exist the convention is to use memcpy.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2019-03-20 15:37:05 +02:00 committed by Kumar Gala
commit 12bf7e6ead

View file

@ -5343,7 +5343,8 @@ int bt_le_adv_start_internal(const struct bt_le_adv_param *param,
} else {
set_param.type = BT_LE_ADV_DIRECT_IND;
}
set_param.direct_addr = *peer;
bt_addr_le_copy(&set_param.direct_addr, peer);
} else {
set_param.type = BT_LE_ADV_IND;
}