summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/lz4hc.h2
-rw-r--r--programs/lz4io.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/lz4hc.h b/lib/lz4hc.h
index fc8067b..0523314 100644
--- a/lib/lz4hc.h
+++ b/lib/lz4hc.h
@@ -134,7 +134,7 @@ LZ4LIB_API int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, in
#define LZ4HC_MAXD (1<<(LZ4HC_DICTIONARY_LOGSIZE+1))
#define LZ4HC_MAXD_MASK (LZ4HC_MAXD - 1)
-#define LZ4HC_HASH_LOG (LZ4HC_DICTIONARY_LOGSIZE+2)
+#define LZ4HC_HASH_LOG (LZ4HC_DICTIONARY_LOGSIZE-1)
#define LZ4HC_HASHTABLESIZE (1 << LZ4HC_HASH_LOG)
#define LZ4HC_HASH_MASK (LZ4HC_HASHTABLESIZE - 1)
diff --git a/programs/lz4io.c b/programs/lz4io.c
index f8a8f2b..46daaf7 100644
--- a/programs/lz4io.c
+++ b/programs/lz4io.c
@@ -591,9 +591,10 @@ int LZ4IO_compressMultipleFilenames(const char** inFileNamesTable, int ifntSize,
char* dstFileName = (char*)malloc(FNSPACE);
size_t ofnSize = FNSPACE;
const size_t suffixSize = strlen(suffix);
- cRess_t const ress = LZ4IO_createCResources();
+ cRess_t ress;
if (dstFileName == NULL) return ifntSize; /* not enough memory */
+ ress = LZ4IO_createCResources();
/* loop on each file */
for (i=0; i<ifntSize; i++) {