Skip to content
Snippets Groups Projects
Commit 21008d57 authored by Chris Manton's avatar Chris Manton
Browse files

legacy: Const-ify deserializing raw address

Bug: 187830698
Tag: #refactor
Test: gd/cert/run

Change-Id: I91d884e91cce827031805e18d0204f2693a1003d
parent 373cef9e
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,12 @@ inline void BDADDR_TO_STREAM(uint8_t*& p, const RawAddress& a) {
*(p)++ = (uint8_t)(a.address)[BD_ADDR_LEN - 1 - ijk];
}
inline void STREAM_TO_BDADDR(RawAddress& a, const uint8_t*& p) {
uint8_t* pbda = (uint8_t*)(a.address) + BD_ADDR_LEN - 1;
for (int ijk = 0; ijk < BD_ADDR_LEN; ijk++) *pbda-- = *(p)++;
}
// DEPRECATED
inline void STREAM_TO_BDADDR(RawAddress& a, uint8_t*& p) {
uint8_t* pbda = (uint8_t*)(a.address) + BD_ADDR_LEN - 1;
for (int ijk = 0; ijk < BD_ADDR_LEN; ijk++) *pbda-- = *(p)++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment