diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2022-01-29 06:35:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-29 06:35:31 (GMT) |
commit | b3a7ca21cefc51fd425f6afeb9b87670013cf42b (patch) | |
tree | 4d179b675e5d12b453c229ca0a57d42b6eace342 | |
parent | 49e4c671c8d17363170f209614c9fc9f594c77a4 (diff) | |
parent | 77bef0969357d835763763dd1a16129445b96a37 (diff) | |
download | lz4-b3a7ca21cefc51fd425f6afeb9b87670013cf42b.zip lz4-b3a7ca21cefc51fd425f6afeb9b87670013cf42b.tar.gz lz4-b3a7ca21cefc51fd425f6afeb9b87670013cf42b.tar.bz2 |
Merge pull request #1057 from lz4/lz4_unalign
renamed unaligned -> LZ4_unaligned
-rw-r--r-- | lib/lz4.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -343,14 +343,14 @@ static void LZ4_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; } /* __pack instructions are safer, but compiler specific, hence potentially problematic for some compilers */ /* currently only defined for gcc and icc */ -typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) unalign; +typedef union { U16 u16; U32 u32; reg_t uArch; } __attribute__((packed)) LZ4_unalign; -static U16 LZ4_read16(const void* ptr) { return ((const unalign*)ptr)->u16; } -static U32 LZ4_read32(const void* ptr) { return ((const unalign*)ptr)->u32; } -static reg_t LZ4_read_ARCH(const void* ptr) { return ((const unalign*)ptr)->uArch; } +static U16 LZ4_read16(const void* ptr) { return ((const LZ4_unalign*)ptr)->u16; } +static U32 LZ4_read32(const void* ptr) { return ((const LZ4_unalign*)ptr)->u32; } +static reg_t LZ4_read_ARCH(const void* ptr) { return ((const LZ4_unalign*)ptr)->uArch; } -static void LZ4_write16(void* memPtr, U16 value) { ((unalign*)memPtr)->u16 = value; } -static void LZ4_write32(void* memPtr, U32 value) { ((unalign*)memPtr)->u32 = value; } +static void LZ4_write16(void* memPtr, U16 value) { ((LZ4_unalign*)memPtr)->u16 = value; } +static void LZ4_write32(void* memPtr, U32 value) { ((LZ4_unalign*)memPtr)->u32 = value; } #else /* safe and portable access using memcpy() */ |