mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 08:14:28 +08:00
emulator: Fix unaligned memory access compilation errors
The u128_xor() function does proper aligned access and accepts void * arguments, therefore the casts are unnecessary and trigger clang errors.
This commit is contained in:
parent
a6f0070f3f
commit
b23ed9bf8d
@ -248,7 +248,7 @@ static int smp_c1(struct smp_conn *conn, uint8_t rnd[16], uint8_t res[16])
|
||||
baswap((bdaddr_t *) (p2 + 10), (bdaddr_t *) conn->ra);
|
||||
|
||||
/* res = r XOR p1 */
|
||||
u128_xor((u128 *) res, (u128 *) rnd, (u128 *) p1);
|
||||
u128_xor(res, rnd, p1);
|
||||
|
||||
/* res = e(k, res) */
|
||||
err = smp_e(conn->smp->alg_sk, conn->tk, res, res);
|
||||
@ -256,7 +256,7 @@ static int smp_c1(struct smp_conn *conn, uint8_t rnd[16], uint8_t res[16])
|
||||
return err;
|
||||
|
||||
/* res = res XOR p2 */
|
||||
u128_xor((u128 *) res, (u128 *) res, (u128 *) p2);
|
||||
u128_xor(res, res, p2);
|
||||
|
||||
/* res = e(k, res) */
|
||||
return smp_e(conn->smp->alg_sk, conn->tk, res, res);
|
||||
|
Loading…
Reference in New Issue
Block a user