Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
deps: fix CLEAR_HASH macro to be usable as a single statement
Apply unreleased (as of zlib v1.2.11) patch from upstream:
- madler/zlib@38e8ce3

Original commit message:
  Fix CLEAR_HASH macro to be usable as a single statement.

  As it is used in deflateParams().

PR-URL: #11616
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
sam-github committed Mar 6, 2017
commit fd17e8b8d250492fdcabbc8b7a3bf57687ae364a
7 changes: 5 additions & 2 deletions deps/zlib/deflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,11 @@ local const config configuration_table[10] = {
* prev[] will be initialized on the fly.
*/
#define CLEAR_HASH(s) \
s->head[s->hash_size-1] = NIL; \
zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
do { \
s->head[s->hash_size-1] = NIL; \
zmemzero((Bytef *)s->head, \
(unsigned)(s->hash_size-1)*sizeof(*s->head)); \
} while (0)

/* ===========================================================================
* Slide the hash table when sliding the window down (could be avoided with 32
Expand Down