Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Aug 2019 23:51:44 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r351500 - vendor/zlib/dist
Message-ID:  <201908252351.x7PNpimK087264@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Sun Aug 25 23:51:44 2019
New Revision: 351500
URL: https://svnweb.freebsd.org/changeset/base/351500

Log:
  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().

Modified:
  vendor/zlib/dist/deflate.c

Modified: vendor/zlib/dist/deflate.c
==============================================================================
--- vendor/zlib/dist/deflate.c	Sun Aug 25 22:30:18 2019	(r351499)
+++ vendor/zlib/dist/deflate.c	Sun Aug 25 23:51:44 2019	(r351500)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908252351.x7PNpimK087264>