summaryrefslogtreecommitdiffstats
path: root/lib/lz4.c
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-08-06 02:49:29 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-08-06 02:49:29 (GMT)
commit9517bd9234f1a8978490b04719e6b704fb8e3686 (patch)
treebece7ef8260820ee6d93069df8d551c57eb1e71e /lib/lz4.c
parenta60d11e468168c53740df6674bf610d05c70a3fb (diff)
downloadlz4-9517bd9234f1a8978490b04719e6b704fb8e3686.zip
lz4-9517bd9234f1a8978490b04719e6b704fb8e3686.tar.gz
lz4-9517bd9234f1a8978490b04719e6b704fb8e3686.tar.bz2
minor simplification lz4_readarch()
Diffstat (limited to 'lib/lz4.c')
-rw-r--r--lib/lz4.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 6f4d293..21390c9 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -183,19 +183,11 @@ static U32 LZ4_read32(const void* memPtr)
return val32;
}
-static U64 LZ4_read64(const void* memPtr)
+static size_t LZ4_read_ARCH(const void* memPtr)
{
- U64 val64;
- memcpy(&val64, memPtr, 8);
- return val64;
-}
-
-static size_t LZ4_read_ARCH(const void* p)
-{
- if (LZ4_64bits())
- return (size_t)LZ4_read64(p);
- else
- return (size_t)LZ4_read32(p);
+ size_t val;
+ memcpy(&val, memPtr, sizeof(val));
+ return val;
}