bluetooth: host: hci_core: fix num_handles
assignment
Replaced `sys_cpu_to_le16(1)` with a direct `1` assignment to the `cp->num_handles` (uint8_t) field to avoid truncation to `0x00` on big-endian architectures. Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This commit is contained in:
parent
5d2068f491
commit
0156a322b1
1 changed files with 1 additions and 1 deletions
|
@ -248,7 +248,7 @@ void bt_send_one_host_num_completed_packets(uint16_t handle)
|
||||||
BT_ASSERT_MSG(buf, "Unable to alloc for Host NCP");
|
BT_ASSERT_MSG(buf, "Unable to alloc for Host NCP");
|
||||||
|
|
||||||
cp = net_buf_add(buf, sizeof(*cp));
|
cp = net_buf_add(buf, sizeof(*cp));
|
||||||
cp->num_handles = sys_cpu_to_le16(1);
|
cp->num_handles = 1;
|
||||||
|
|
||||||
hc = net_buf_add(buf, sizeof(*hc));
|
hc = net_buf_add(buf, sizeof(*hc));
|
||||||
hc->handle = sys_cpu_to_le16(handle);
|
hc->handle = sys_cpu_to_le16(handle);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue