]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
fix macro for msvc
authorMat Berchtold <mberchtold@gmail.com>
Thu, 29 Oct 2015 14:38:40 +0000 (15:38 +0100)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Mon, 2 Nov 2015 12:06:38 +0000 (13:06 +0100)
deflate.h

index 107bb4276d926f9c5e57281bb5f6ea1bf314ee6e..fedb29eacbf1c7f3def9bcbf3ee29ee5de7ee1a6 100644 (file)
--- a/deflate.h
+++ b/deflate.h
@@ -387,8 +387,8 @@ void ZLIB_INTERNAL bi_windup(deflate_state *s);
  *    previous key instead of complete recalculation each time.
  */
 #ifdef X86_SSE4_2_CRC_HASH
-#define UPDATE_HASH(s, h, i) (\
-    {\
+#define UPDATE_HASH(s, h, i) \
+    do {\
         if (s->level < 6) \
             h = (3483 * (s->window[i]) +\
                  23081* (s->window[i+1]) +\
@@ -398,7 +398,7 @@ void ZLIB_INTERNAL bi_windup(deflate_state *s);
             h = (25881* (s->window[i]) +\
                  24674* (s->window[i+1]) +\
                  25811* (s->window[i+2])) & s->hash_mask;\
-    })
+    } while (0)
 #else
 #   define UPDATE_HASH(s, h, i) (h = (((h) << s->hash_shift) ^ (s->window[i + (MIN_MATCH-1)])) & s->hash_mask)
 #endif