aboutsummaryrefslogtreecommitdiff
path: root/deflate.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2017-01-22 23:38:52 -0800
committerMark Adler <madler@alumni.caltech.edu>2017-02-15 22:39:26 -0800
commit38e8ce32afbaa82f67d992b9f3056f281fe69259 (patch)
tree73e1a5fcb65608db48c83c89d0b6649edbe709be /deflate.c
parent8ba393e70d984d902b15b9e6876f4d0d38ae4be8 (diff)
downloadzlib-38e8ce32afbaa82f67d992b9f3056f281fe69259.tar.gz
zlib-38e8ce32afbaa82f67d992b9f3056f281fe69259.tar.bz2
zlib-38e8ce32afbaa82f67d992b9f3056f281fe69259.zip
Fix CLEAR_HASH macro to be usable as a single statement.
As it is used in deflateParams().
Diffstat (limited to 'deflate.c')
-rw-r--r--deflate.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/deflate.c b/deflate.c
index e97bd87..568eadd 100644
--- a/deflate.c
+++ b/deflate.c
@@ -190,8 +190,11 @@ local const config configuration_table[10] = {
190 * prev[] will be initialized on the fly. 190 * prev[] will be initialized on the fly.
191 */ 191 */
192#define CLEAR_HASH(s) \ 192#define CLEAR_HASH(s) \
193 s->head[s->hash_size-1] = NIL; \ 193 do { \
194 zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); 194 s->head[s->hash_size-1] = NIL; \
195 zmemzero((Bytef *)s->head, \
196 (unsigned)(s->hash_size-1)*sizeof(*s->head)); \
197 } while (0)
195 198
196/* =========================================================================== 199/* ===========================================================================
197 * Slide the hash table when sliding the window down (could be avoided with 32 200 * Slide the hash table when sliding the window down (could be avoided with 32