From: Hans Kristian Rosbach Date: Thu, 25 Jun 2015 20:34:06 +0000 (+0200) Subject: No need to update hash_head. X-Git-Tag: 1.9.9-b1~796^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=785a1ec85ffa6f1d700a7cdb975bffdd7f2e9ac5;p=thirdparty%2Fzlib-ng.git No need to update hash_head. Plus a single style change to match the other deflate algorithms. --- diff --git a/deflate_medium.c b/deflate_medium.c index 7e9c9de18..995a2cb97 100644 --- a/deflate_medium.c +++ b/deflate_medium.c @@ -204,7 +204,8 @@ block_state deflate_medium(deflate_state *s, int flush) { if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { return need_more; } - if (s->lookahead == 0) break; /* flush the current block */ + if (s->lookahead == 0) + break; /* flush the current block */ next_match.match_length = 0; } s->prev_length = 2; diff --git a/deflate_slow.c b/deflate_slow.c index 6c212342b..6a855f0c8 100644 --- a/deflate_slow.c +++ b/deflate_slow.c @@ -97,7 +97,7 @@ block_state deflate_slow(deflate_state *s, int flush) { s->prev_length -= 2; do { if (++s->strstart <= max_insert) { - hash_head = insert_string(s, s->strstart); + insert_string(s, s->strstart); } } while (--s->prev_length != 0); s->match_available = 0;