Skip to content
Snippets Groups Projects
Commit 38e8ce32 authored by Mark Adler's avatar Mark Adler
Browse files

Fix CLEAR_HASH macro to be usable as a single statement.

As it is used in deflateParams().
parent 8ba393e7
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment