]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Clean up
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Tue, 3 Nov 2015 14:22:16 +0000 (15:22 +0100)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Tue, 3 Nov 2015 14:22:16 +0000 (15:22 +0100)
match.c

diff --git a/match.c b/match.c
index f6e2cba6edd52663882f6a74777b1a8b91d1ccd6..0d934e20553565c1884a34e00b0577004ce6732a 100644 (file)
--- a/match.c
+++ b/match.c
 #endif
 
 
+#ifdef _MSC_VER
+#include <intrin.h>
+/* This is not a general purpose replacement for __builtin_ctzl. The function expects that value is != 0
+ * Because of that assumption trailing_zero is not initialized and the return value of _BitScanForward is not checked
+ */
+static __forceinline unsigned long __builtin_ctzl(unsigned long value)
+{
+       unsigned long trailing_zero;
+       _BitScanForward(&trailing_zero, value);
+       return trailing_zero;
+}
+#endif
+
+
+
 #ifdef std1_longest_match
 
 /*
@@ -268,20 +283,6 @@ ZLIB_INTERNAL unsigned longest_match(deflate_state *const s, IPos cur_match) {
 #endif
 
 #ifdef std3_longest_match
-
-#ifdef _MSC_VER
-#include <intrin.h>
-/* This is not a general purpose replacement for __builtin_ctzl. The function expects that value is != 0
- * Because of that assumption trailing_zero is not initialized and the return value of _BitScanForward is not checked
- */
-static __forceinline unsigned long __builtin_ctzl(unsigned long value)
-{
-       unsigned long trailing_zero;
-       _BitScanForward(&trailing_zero, value);
-       return trailing_zero;
-}
-#endif
-
 /* longest_match() with minor change to improve performance (in terms of
  * execution time).
  *