aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lz/lz_encoder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-02-08 18:24:50 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-02-08 18:24:50 +0200
commit0e27028d74c5c7a8e036ae2a9b8cecb0ac79d3a6 (patch)
treeda1e0548876b37f0100390e36593097b6fc99c20 /src/liblzma/lz/lz_encoder.c
parentMake "xz --force" to write to terminal as the error (diff)
downloadxz-0e27028d74c5c7a8e036ae2a9b8cecb0ac79d3a6.tar.xz
Add a separate internal function to initialize the CRC32
table, which is used also by LZ encoder. This was needed because calling lzma_crc32() and ignoring the result is a no-op due to lzma_attr_pure.
Diffstat (limited to 'src/liblzma/lz/lz_encoder.c')
-rw-r--r--src/liblzma/lz/lz_encoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liblzma/lz/lz_encoder.c b/src/liblzma/lz/lz_encoder.c
index 22a37cd7..0b4a2931 100644
--- a/src/liblzma/lz/lz_encoder.c
+++ b/src/liblzma/lz/lz_encoder.c
@@ -20,6 +20,7 @@
#include "lz_encoder.h"
#include "lz_encoder_hash.h"
+#include "check.h"
struct lzma_coder_s {
@@ -488,8 +489,7 @@ lzma_lz_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
{
#ifdef HAVE_SMALL
// We need that the CRC32 table has been initialized.
- // This is enough to do it.
- lzma_crc32(NULL, 0, 0);
+ lzma_crc32_init();
#endif
// Allocate and initialize the base data structure.