diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2015-08-06 02:49:29 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2015-08-06 02:49:29 (GMT) |
commit | 9517bd9234f1a8978490b04719e6b704fb8e3686 (patch) | |
tree | bece7ef8260820ee6d93069df8d551c57eb1e71e /lib/lz4.c | |
parent | a60d11e468168c53740df6674bf610d05c70a3fb (diff) | |
download | lz4-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.c | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -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; } |