diff options
author | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2012-03-16 19:50:58 (GMT) |
---|---|---|
committer | yann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd> | 2012-03-16 19:50:58 (GMT) |
commit | fd281f8e5d8822b0f2178d63c80315869c42cc58 (patch) | |
tree | 51f319119bf0663547ae0b259b56433dc0dd45a8 /lz4.c | |
parent | ad59ba1cfad62af37c44ded985fe1e2a0dffae05 (diff) | |
download | lz4-fd281f8e5d8822b0f2178d63c80315869c42cc58.zip lz4-fd281f8e5d8822b0f2178d63c80315869c42cc58.tar.gz lz4-fd281f8e5d8822b0f2178d63c80315869c42cc58.tar.bz2 |
Added : lz4demo : software swap32 backend for compilers which do not support hardware ones. Thanks Dmitry Cherepanov for contribution
git-svn-id: https://lz4.googlecode.com/svn/trunk@60 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
Diffstat (limited to 'lz4.c')
-rw-r--r-- | lz4.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -215,10 +215,10 @@ typedef struct _U64_S { U64 v; } U64_S; #if (defined(LZ4_BIG_ENDIAN) && !defined(BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE))
#define LZ4_READ_LITTLEENDIAN_16(d,s,p) { U16 v = A16(p); v = bswap16(v); d = (s) - v; }
-#define LZ4_WRITE_LITTLEENDIAN_16(p,i) { U16 v = (U16)(i); v = bswap16(v); A16(p) = v; p+=2; }
+#define LZ4_WRITE_LITTLEENDIAN_16(p,i) { U16 v = (U16)(i); v = bswap16(v); A16(p) = v; p+=2; }
#else // Little Endian
#define LZ4_READ_LITTLEENDIAN_16(d,s,p) { d = (s) - A16(p); }
-#define LZ4_WRITE_LITTLEENDIAN_16(p,v) { A16(p) = v; p+=2; }
+#define LZ4_WRITE_LITTLEENDIAN_16(p,v) { A16(p) = v; p+=2; }
#endif
|