diff options
Diffstat (limited to '')
-rw-r--r-- | src/liblzma/delta/delta_common.c | 12 | ||||
-rw-r--r-- | src/liblzma/delta/delta_common.h | 2 | ||||
-rw-r--r-- | src/liblzma/delta/delta_decoder.c | 2 | ||||
-rw-r--r-- | src/liblzma/delta/delta_encoder.c | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/liblzma/delta/delta_common.c b/src/liblzma/delta/delta_common.c index 86ef33be..90b5552b 100644 --- a/src/liblzma/delta/delta_common.c +++ b/src/liblzma/delta/delta_common.c @@ -50,17 +50,17 @@ lzma_delta_coder_init(lzma_next_coder *next, lzma_allocator *allocator, // Set the delta distance. if (filters[0].options == NULL) return LZMA_PROG_ERROR; - next->coder->distance = ((lzma_options_delta *)(filters[0].options)) - ->distance; - if (next->coder->distance < LZMA_DELTA_DISTANCE_MIN - || next->coder->distance > LZMA_DELTA_DISTANCE_MAX) + next->coder->distance + = ((lzma_options_delta *)(filters[0].options))->dist; + if (next->coder->distance < LZMA_DELTA_DIST_MIN + || next->coder->distance > LZMA_DELTA_DIST_MAX) return LZMA_OPTIONS_ERROR; // Initialize the rest of the variables. next->coder->pos = 0; - memzero(next->coder->history, LZMA_DELTA_DISTANCE_MAX); + memzero(next->coder->history, LZMA_DELTA_DIST_MAX); // Initialize the next decoder in the chain, if any. return lzma_next_filter_init(&next->coder->next, - allocator, filters + 1); + allocator, filters + 1); } diff --git a/src/liblzma/delta/delta_common.h b/src/liblzma/delta/delta_common.h index 1d58899d..e7b3eeda 100644 --- a/src/liblzma/delta/delta_common.h +++ b/src/liblzma/delta/delta_common.h @@ -33,7 +33,7 @@ struct lzma_coder_s { uint8_t pos; /// Buffer to hold history of the original data - uint8_t history[LZMA_DELTA_DISTANCE_MAX]; + uint8_t history[LZMA_DELTA_DIST_MAX]; }; diff --git a/src/liblzma/delta/delta_decoder.c b/src/liblzma/delta/delta_decoder.c index 80ef173a..26dc40fe 100644 --- a/src/liblzma/delta/delta_decoder.c +++ b/src/liblzma/delta/delta_decoder.c @@ -74,7 +74,7 @@ lzma_delta_props_decode(void **options, lzma_allocator *allocator, return LZMA_MEM_ERROR; opt->type = LZMA_DELTA_TYPE_BYTE; - opt->distance = props[0] + 1; + opt->dist = props[0] + 1; *options = opt; diff --git a/src/liblzma/delta/delta_encoder.c b/src/liblzma/delta/delta_encoder.c index 56afa90a..bb772a6c 100644 --- a/src/liblzma/delta/delta_encoder.c +++ b/src/liblzma/delta/delta_encoder.c @@ -109,11 +109,11 @@ lzma_delta_props_encode(const void *options, uint8_t *out) // It's possible that newer liblzma versions will support larger // distance values. if (opt->type != LZMA_DELTA_TYPE_BYTE - || opt->distance < LZMA_DELTA_DISTANCE_MIN - || opt->distance > LZMA_DELTA_DISTANCE_MAX) + || opt->dist < LZMA_DELTA_DIST_MIN + || opt->dist > LZMA_DELTA_DIST_MAX) return LZMA_OPTIONS_ERROR; - out[0] = opt->distance - LZMA_DELTA_DISTANCE_MIN; + out[0] = opt->dist - LZMA_DELTA_DIST_MIN; return LZMA_OK; } |