Re: [RFC 2/7] Use memcpy to convert from network to host order on BE hosts

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

 



Hi Claudio,

On Fri, Feb 11, 2011 at 5:37 PM, Claudio Takahasi
<claudio.takahasi@xxxxxxxxxxxxx> wrote:
> ---
>  lib/bluetooth.h |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/lib/bluetooth.h b/lib/bluetooth.h
> index bc020ad..d8f36f8 100644
> --- a/lib/bluetooth.h
> +++ b/lib/bluetooth.h
> @@ -127,9 +127,7 @@ static inline void btoh128(const uint128_t *src, uint128_t *dst)
>  #define ntoh64(x) (x)
>  static inline void ntoh128(const uint128_t *src, uint128_t *dst)
>  {
> -       int i;
> -       for (i = 0; i < 16; i++)
> -               dst->data[i] = src->data[i];
> +       memcpy(dst, src, sizeof(uint128_t));
>  }

I believe this patch is harmless and can be already applied
independently from other patches on this series, right?

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