From: Nathan Moinvaziri Date: Wed, 19 Aug 2020 00:46:55 +0000 (-0700) Subject: Store hash_mask in local variable for insert_string loop. X-Git-Tag: 1.9.9-b1~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38e5e4b20c204fb16a1026c754c5b320f27395b4;p=thirdparty%2Fzlib-ng.git Store hash_mask in local variable for insert_string loop. --- diff --git a/insert_string_tpl.h b/insert_string_tpl.h index 4900010c..00aad32d 100644 --- a/insert_string_tpl.h +++ b/insert_string_tpl.h @@ -64,6 +64,7 @@ ZLIB_INTERNAL Pos INSERT_STRING(deflate_state *const s, const uint32_t str, uint Pos idx, ret = 0; uint8_t *strstart = s->window + str; uint8_t *strend = strstart + count - 1; /* last position */ + uint32_t hash_mask = s->hash_mask; for (idx = str; strstart <= strend; idx++, strstart++) { uint32_t val, hm, h = 0; @@ -78,7 +79,7 @@ ZLIB_INTERNAL Pos INSERT_STRING(deflate_state *const s, const uint32_t str, uint #endif UPDATE_HASH(s, h, val); - hm = h & s->hash_mask; + hm = h & hash_mask; Pos head = s->head[hm]; if (head != idx) {