Skip to content

Commit 12bf7e6

Browse files
Johan Hedberggalak
authored andcommitted
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 <[email protected]>
1 parent bdde5fd commit 12bf7e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subsys/bluetooth/host/hci_core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5343,7 +5343,8 @@ int bt_le_adv_start_internal(const struct bt_le_adv_param *param,
53435343
} else {
53445344
set_param.type = BT_LE_ADV_DIRECT_IND;
53455345
}
5346-
set_param.direct_addr = *peer;
5346+
5347+
bt_addr_le_copy(&set_param.direct_addr, peer);
53475348
} else {
53485349
set_param.type = BT_LE_ADV_IND;
53495350
}

0 commit comments

Comments
 (0)