diff options
| author | Mark Adler <madler@alumni.caltech.edu> | 2017-01-22 23:38:52 -0800 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2017-02-15 22:39:26 -0800 |
| commit | 38e8ce32afbaa82f67d992b9f3056f281fe69259 (patch) | |
| tree | 73e1a5fcb65608db48c83c89d0b6649edbe709be | |
| parent | 8ba393e70d984d902b15b9e6876f4d0d38ae4be8 (diff) | |
| download | zlib-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().
| -rw-r--r-- | deflate.c | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -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 |
