From 3db0198358e1b8101d78a7c785e4f4efde4fcaf9 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Thu, 23 Aug 2018 18:08:20 +0200 Subject: util/cbfstool: Fix typos Change-Id: I6967a106ce1286d633ddeeb041f582e65f9ea78c Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/28208 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Martin Roth --- util/cbfstool/lz4/lib/lz4frame.c | 2 +- util/cbfstool/lz4/lib/xxhash.c | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'util/cbfstool/lz4') diff --git a/util/cbfstool/lz4/lib/lz4frame.c b/util/cbfstool/lz4/lib/lz4frame.c index f984b2734a..aef508d8df 100644 --- a/util/cbfstool/lz4/lib/lz4frame.c +++ b/util/cbfstool/lz4/lib/lz4frame.c @@ -184,7 +184,7 @@ static size_t LZ4F_getBlockSize(unsigned blockSizeID) } -/* unoptimized version; solves endianess & alignment issues */ +/* unoptimized version; solves endianness & alignment issues */ static U32 LZ4F_readLE32 (const BYTE* srcPtr) { U32 value32 = srcPtr[0]; diff --git a/util/cbfstool/lz4/lib/xxhash.c b/util/cbfstool/lz4/lib/xxhash.c index ed9f8ed2e9..0f896266f0 100644 --- a/util/cbfstool/lz4/lib/xxhash.c +++ b/util/cbfstool/lz4/lib/xxhash.c @@ -65,7 +65,7 @@ You can contact the author at : /* #define XXH_ACCEPT_NULL_INPUT_POINTER 1 */ /* XXH_FORCE_NATIVE_FORMAT : - * By default, xxHash library provides endian-independant Hash values, based on little-endian convention. + * By default, xxHash library provides endian-independent Hash values, based on little-endian convention. * Results are therefore identical for little-endian and big-endian CPU. * This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format. * Should endian-independance be of no importance for your application, you may set the #define below to 1, @@ -219,7 +219,7 @@ static U64 XXH_swap64 (U64 x) /*************************************** * Architecture Macros ***************************************/ -typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess; +typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianness; /* XXH_CPU_LITTLE_ENDIAN can be defined externally, for example one the compiler command line */ #ifndef XXH_CPU_LITTLE_ENDIAN @@ -233,7 +233,7 @@ typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess; *****************************/ typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment; -FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_alignment align) +FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianness endian, XXH_alignment align) { if (align==XXH_unaligned) return endian==XXH_littleEndian ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr)); @@ -241,12 +241,12 @@ FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_a return endian==XXH_littleEndian ? *(const U32*)ptr : XXH_swap32(*(const U32*)ptr); } -FORCE_INLINE U32 XXH_readLE32(const void* ptr, XXH_endianess endian) +FORCE_INLINE U32 XXH_readLE32(const void* ptr, XXH_endianness endian) { return XXH_readLE32_align(ptr, endian, XXH_unaligned); } -FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_alignment align) +FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianness endian, XXH_alignment align) { if (align==XXH_unaligned) return endian==XXH_littleEndian ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr)); @@ -254,7 +254,7 @@ FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_a return endian==XXH_littleEndian ? *(const U64*)ptr : XXH_swap64(*(const U64*)ptr); } -FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianess endian) +FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianness endian) { return XXH_readLE64_align(ptr, endian, XXH_unaligned); } @@ -285,7 +285,7 @@ FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianess endian) /***************************** * Simple Hash Functions *****************************/ -FORCE_INLINE U32 XXH32_endian_align(const void* input, size_t len, U32 seed, XXH_endianess endian, XXH_alignment align) +FORCE_INLINE U32 XXH32_endian_align(const void* input, size_t len, U32 seed, XXH_endianness endian, XXH_alignment align) { const BYTE* p = (const BYTE*)input; const BYTE* bEnd = p + len; @@ -371,7 +371,7 @@ unsigned int XXH32 (const void* input, size_t len, unsigned int seed) XXH32_update(&state, input, len); return XXH32_digest(&state); #else - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; # if !defined(XXH_USELESS_ALIGN_BRANCH) if ((((size_t)input) & 3) == 0) /* Input is 4-bytes aligned, leverage the speed benefit */ @@ -390,7 +390,7 @@ unsigned int XXH32 (const void* input, size_t len, unsigned int seed) #endif } -FORCE_INLINE U64 XXH64_endian_align(const void* input, size_t len, U64 seed, XXH_endianess endian, XXH_alignment align) +FORCE_INLINE U64 XXH64_endian_align(const void* input, size_t len, U64 seed, XXH_endianness endian, XXH_alignment align) { const BYTE* p = (const BYTE*)input; const BYTE* bEnd = p + len; @@ -511,7 +511,7 @@ unsigned long long XXH64 (const void* input, size_t len, unsigned long long seed XXH64_update(&state, input, len); return XXH64_digest(&state); #else - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; # if !defined(XXH_USELESS_ALIGN_BRANCH) if ((((size_t)input) & 7)==0) /* Input is aligned, let's leverage the speed advantage */ @@ -612,7 +612,7 @@ XXH_errorcode XXH64_reset(XXH64_state_t* state_in, unsigned long long seed) } -FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state_in, const void* input, size_t len, XXH_endianess endian) +FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state_in, const void* input, size_t len, XXH_endianness endian) { XXH_istate32_t* state = (XXH_istate32_t *) state_in; const BYTE* p = (const BYTE*)input; @@ -703,7 +703,7 @@ FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state_in, const v XXH_errorcode XXH32_update (XXH32_state_t* state_in, const void* input, size_t len) { - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH32_update_endian(state_in, input, len, XXH_littleEndian); @@ -713,7 +713,7 @@ XXH_errorcode XXH32_update (XXH32_state_t* state_in, const void* input, size_t l -FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state_in, XXH_endianess endian) +FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state_in, XXH_endianness endian) { const XXH_istate32_t* state = (const XXH_istate32_t*) state_in; const BYTE * p = (const BYTE*)state->mem32; @@ -757,7 +757,7 @@ FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state_in, XXH_endiane unsigned int XXH32_digest (const XXH32_state_t* state_in) { - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH32_digest_endian(state_in, XXH_littleEndian); @@ -766,7 +766,7 @@ unsigned int XXH32_digest (const XXH32_state_t* state_in) } -FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state_in, const void* input, size_t len, XXH_endianess endian) +FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state_in, const void* input, size_t len, XXH_endianness endian) { XXH_istate64_t * state = (XXH_istate64_t *) state_in; const BYTE* p = (const BYTE*)input; @@ -857,7 +857,7 @@ FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state_in, const v XXH_errorcode XXH64_update (XXH64_state_t* state_in, const void* input, size_t len) { - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH64_update_endian(state_in, input, len, XXH_littleEndian); @@ -867,7 +867,7 @@ XXH_errorcode XXH64_update (XXH64_state_t* state_in, const void* input, size_t l -FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state_in, XXH_endianess endian) +FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state_in, XXH_endianness endian) { const XXH_istate64_t * state = (const XXH_istate64_t *) state_in; const BYTE * p = (const BYTE*)state->mem64; @@ -951,7 +951,7 @@ FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state_in, XXH_endiane unsigned long long XXH64_digest (const XXH64_state_t* state_in) { - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH64_digest_endian(state_in, XXH_littleEndian); -- cgit v1.2.3