summaryrefslogtreecommitdiffstats
path: root/fast_encoder.c
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2016-06-01 14:10:15 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2016-06-01 14:10:32 +0000
commitfca77b8fe5d1873634032206272a4ecf67434e4c (patch)
tree0f29e18c7457ef87a740354fd691750ecf489ea2 /fast_encoder.c
parentReleasing debian version 1.7-2. (diff)
downloadlzlib-fca77b8fe5d1873634032206272a4ecf67434e4c.tar.xz
lzlib-fca77b8fe5d1873634032206272a4ecf67434e4c.zip
Merging upstream version 1.8.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'fast_encoder.c')
-rw-r--r--fast_encoder.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fast_encoder.c b/fast_encoder.c
index 9afc70e..03697cc 100644
--- a/fast_encoder.c
+++ b/fast_encoder.c
@@ -1,5 +1,5 @@
/* Lzlib - Compression library for the lzip format
- Copyright (C) 2009-2015 Antonio Diaz Diaz.
+ Copyright (C) 2009-2016 Antonio Diaz Diaz.
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -40,7 +40,6 @@ int FLZe_longest_match_len( struct FLZ_encoder * const fe, int * const distance
newpos = fe->eb.mb.prev_positions[fe->key4];
fe->eb.mb.prev_positions[fe->key4] = pos1;
-
for( count = 4; ; )
{
if( --count < 0 || newpos <= 0 ) { *ptr0 = 0; break; }
@@ -106,12 +105,11 @@ bool FLZe_encode_member( struct FLZ_encoder * const fe )
Re_member_position( &fe->eb.renc ) < fe->eb.member_size_limit )
{
int match_distance;
- int main_len, pos_state, len;
+ int main_len, pos_state, len = 0;
if( !Mb_enough_available_bytes( &fe->eb.mb ) ||
!Re_enough_free_bytes( &fe->eb.renc ) ) return true;
main_len = FLZe_longest_match_len( fe, &match_distance );
pos_state = Mb_data_position( &fe->eb.mb ) & pos_state_mask;
- len = 0;
for( i = 0; i < num_rep_distances; ++i )
{