* [PATCH] Use memcpy for network to host order function on BE hosts
@ 2011-02-17 17:39 Claudio Takahasi
2011-02-17 18:53 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Claudio Takahasi @ 2011-02-17 17:39 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Claudio Takahasi
Harmless change replacing "for" by "memcpy". Note that this change
is inside the block reserved to big endian functions.
---
lib/sdp.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/lib/sdp.c b/lib/sdp.c
index 3e3a8f8..e782aec 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -62,13 +62,11 @@
#if __BYTE_ORDER == __BIG_ENDIAN
#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));
}
static inline void btoh128(const uint128_t *src, uint128_t *dst)
{
int i;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Use memcpy for network to host order function on BE hosts
2011-02-17 17:39 [PATCH] Use memcpy for network to host order function on BE hosts Claudio Takahasi
@ 2011-02-17 18:53 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-02-17 18:53 UTC (permalink / raw)
To: Claudio Takahasi; +Cc: linux-bluetooth
Hi Claudio,
On Thu, Feb 17, 2011, Claudio Takahasi wrote:
> Harmless change replacing "for" by "memcpy". Note that this change
> is inside the block reserved to big endian functions.
> ---
> lib/sdp.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-17 18:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-17 17:39 [PATCH] Use memcpy for network to host order function on BE hosts Claudio Takahasi
2011-02-17 18:53 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).