diff options
| author | Mark Adler <madler@alumni.caltech.edu> | 2019-06-06 04:24:20 -0700 |
|---|---|---|
| committer | John Levon <john.levon@joyent.com> | 2019-06-10 06:22:06 -0700 |
| commit | 0ab6f5190f1236c6d1d0e14df5129e0694b77426 (patch) | |
| tree | a4e72614baf9da7f24bf395bc14a8a6668050751 /usr/src | |
| parent | 479c108b209ea78791b37ea89ce0f9b6847d7c6b (diff) | |
| download | illumos-gate-0ab6f5190f1236c6d1d0e14df5129e0694b77426.tar.gz | |
11204 smatch issue in zlib/deflate.c
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Gergő Doma <domag02@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/contrib/zlib/deflate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/src/contrib/zlib/deflate.c b/usr/src/contrib/zlib/deflate.c index 5cdb078df6..771aad0ec2 100644 --- a/usr/src/contrib/zlib/deflate.c +++ b/usr/src/contrib/zlib/deflate.c @@ -188,8 +188,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 |
