summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2016-06-29 13:04:19 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2016-06-29 13:04:19 (GMT)
commitc8a573d32c3347285d09154ed6d1a55af52655bc (patch)
tree847c1a6ede7d06ce007a7e36129a1f4e69cc2371 /lib
parenta5508b1ad2260fc4cfb784da3ed4867933177c0d (diff)
downloadlz4-c8a573d32c3347285d09154ed6d1a55af52655bc.zip
lz4-c8a573d32c3347285d09154ed6d1a55af52655bc.tar.gz
lz4-c8a573d32c3347285d09154ed6d1a55af52655bc.tar.bz2
very minor decompression speed gain
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index cf889d5..ba8e462 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1146,7 +1146,7 @@ FORCE_INLINE int LZ4_decompress_generic(
/* Special cases */
- if ((partialDecoding) && (oexit> oend-MFLIMIT)) oexit = oend-MFLIMIT; /* targetOutputSize too high => decode everything */
+ if ((partialDecoding) && (oexit > oend-MFLIMIT)) oexit = oend-MFLIMIT; /* targetOutputSize too high => decode everything */
if ((endOnInput) && (unlikely(outputSize==0))) return ((inputSize==1) && (*ip==0)) ? 0 : -1; /* Empty output buffer */
if ((!endOnInput) && (unlikely(outputSize==0))) return (*ip==0?1:-1);
@@ -1165,7 +1165,7 @@ FORCE_INLINE int LZ4_decompress_generic(
do {
s = *ip++;
length += s;
- } while ( likely(endOnInput ? ip<iend-RUN_MASK : 1) && (s==255) );
+ } while ( likely(endOnInput ? ip<iend-RUN_MASK : 1) & (s==255) );
if ((safeDecode) && unlikely((size_t)(op+length)<(size_t)(op))) goto _output_error; /* overflow detection */
if ((safeDecode) && unlikely((size_t)(ip+length)<(size_t)(ip))) goto _output_error; /* overflow detection */
}