summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-11-07 19:22:57 (GMT)
committerYann Collet <cyan@fb.com>2017-11-07 19:22:57 (GMT)
commit5512a5f1a932d4d906f3bbecf1932863bcac7b2b (patch)
treeaa5e1c2bdc800849b6f50cf92418ceba3ac9abfc
parent7130bfe5733347d8c84b8f6b8fb34c1397d4a173 (diff)
downloadlz4-5512a5f1a932d4d906f3bbecf1932863bcac7b2b.zip
lz4-5512a5f1a932d4d906f3bbecf1932863bcac7b2b.tar.gz
lz4-5512a5f1a932d4d906f3bbecf1932863bcac7b2b.tar.bz2
removed useless `(1 && ...)` condition
as reported by @terrelln
-rw-r--r--lib/lz4hc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c
index 1880d53..5882109 100644
--- a/lib/lz4hc.c
+++ b/lib/lz4hc.c
@@ -119,8 +119,9 @@ LZ4_FORCE_INLINE void LZ4HC_Insert (LZ4HC_CCtx_internal* hc4, const BYTE* ip)
/** LZ4HC_countBack() :
* @return : negative value, nb of common bytes before ip/match */
-static int LZ4HC_countBack(const BYTE* const ip, const BYTE* const match,
- const BYTE* const iMin, const BYTE* const mMin)
+LZ4_FORCE_INLINE
+int LZ4HC_countBack(const BYTE* const ip, const BYTE* const match,
+ const BYTE* const iMin, const BYTE* const mMin)
{
int back=0;
while ( (ip+back > iMin)
@@ -264,7 +265,7 @@ LZ4_FORCE_INLINE int LZ4HC_InsertAndGetWiderMatch (
{ U32 const nextOffset = DELTANEXTU16(chainTable, matchIndex);
matchIndex -= nextOffset;
- if (1 && (nextOffset==1)) {
+ if (nextOffset==1) {
/* may be a repeated pattern */
if (repeat == rep_untested) {
if ((pattern & 0xFFFF) == (pattern >> 16)) { /* is it enough ? */