lkml.org 
[lkml]   [2017]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 0/5] Update LZ4 compressor module
Also I noticed another bug, this time in LZ4_count():

> #if defined(CONFIG_64BIT)
> #define LZ4_ARCH64 1
> #else
> #define LZ4_ARCH64 0
> #endif
...
> #ifdef LZ4_ARCH64
> if ((pIn < (pInLimit-3))
> && (LZ4_read32(pMatch) == LZ4_read32(pIn))) {
> pIn += 4; pMatch += 4;
> }
> #endif

Because of how LZ4_ARCH64 is defined, it needs to be '#if LZ4_ARCH64'.

But I also think the way upstream LZ4 does 64-bit detection could have just been
left as-is; it has a function which gets inlined:

static unsigned LZ4_64bits(void) { return sizeof(void*)==8; }

Eric

\
 
 \ /
  Last update: 2017-02-09 07:32    [W:0.178 / U:5.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site