Re: [RFC v2 15/15] hciemu: Fix build errors due to unaligned memory access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi  Szymon,

On Fri, Aug 31, 2012 at 8:40 AM, Szymon Janc <szymon.janc@xxxxxxxxx> wrote:
> --- a/test/hciemu.c
> +++ b/test/hciemu.c
> @@ -426,8 +426,10 @@ static void num_completed_pkts(struct vhci_conn *conn)
>         np = (void *) ptr; ptr += EVT_NUM_COMP_PKTS_SIZE;
>         np->num_hndl = 1;
>
> -       *((uint16_t *) ptr) = htobs(conn->handle); ptr += 2;
> -       *((uint16_t *) ptr) = htobs(vdev.acl_cnt); ptr += 2;
> +       bt_put_be16(conn->handle, ptr);
> +       ptr += 2;
> +       bt_put_be16(vdev.acl_cnt, ptr);
> +       ptr += 2;

These should be bt_put_le16().

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux