1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00

Import vendor commit 38e8ce32afbaa82f67d992b9f3056f281fe69259:

Author: Mark Adler <madler@alumni.caltech.edu>
  Date:   Sun Jan 22 23:38:52 2017 -0800

    Fix CLEAR_HASH macro to be usable as a single statement.

    As it is used in deflateParams().
This commit is contained in:
Xin LI 2019-08-25 23:51:44 +00:00
parent ab4f92b809
commit befc3e504d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/zlib/dist/; revision=351500

View File

@ -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