aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-04-03 11:32:01 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-04-03 11:32:01 +0000
commit4a36c1fdf3a0bd7c852fee5e0217976e9368e255 (patch)
tree5ef5bc6e24bd0a3c6ed3a210012eed43de162d1d /sys
parent68f156409ed61b9d2a6748322801463eca39ebdc (diff)
downloadsrc-4a36c1fdf3a0bd7c852fee5e0217976e9368e255.tar.gz
src-4a36c1fdf3a0bd7c852fee5e0217976e9368e255.zip
Pointy hat commit:
Don't Cut&Paste from big endian to little endian function without subsequent adjustments.
Notes
Notes: svn path=/head/; revision=113009
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/endian.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/endian.h b/sys/sys/endian.h
index 8ffa66c94c09..01af50670a48 100644
--- a/sys/sys/endian.h
+++ b/sys/sys/endian.h
@@ -136,7 +136,7 @@ le64dec(const void *pp)
{
unsigned char const *p = pp;
- return (((uint64_t)be32dec(p + 4) << 32) | be32dec(p));
+ return (((uint64_t)le32dec(p + 4) << 32) | le32dec(p));
}
static __inline void
@@ -193,8 +193,8 @@ le64enc(void *pp, uint64_t u)
{
unsigned char *p = pp;
- be32enc(p, u & 0xffffffff);
- be32enc(p + 4, u >> 32);
+ le32enc(p, u & 0xffffffff);
+ le32enc(p + 4, u >> 32);
}
#endif /* _SYS_ENDIAN_H_ */