]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove unneeded pointer for functable.longest_match in deflate_slow
authorNathan Moinvaziri <nathan@nathanm.com>
Thu, 4 Jan 2024 22:18:49 +0000 (14:18 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 15 Jan 2024 12:00:04 +0000 (13:00 +0100)
deflate_slow.c

index 9f1c913467b7e8239c5450490d17fe9c29cbccf6..cb2f0a02b4e0f5b9e4c194574717ecb4f97659b2 100644 (file)
@@ -19,12 +19,12 @@ Z_INTERNAL block_state deflate_slow(deflate_state *s, int flush) {
     int bflush;              /* set if current block must be flushed */
     int64_t dist;
     uint32_t match_len;
-    match_func *longest_match;
+    match_func longest_match;
 
     if (s->max_chain_length <= 1024)
-        longest_match = &functable.longest_match;
+        longest_match = functable.longest_match;
     else
-        longest_match = &functable.longest_match_slow;
+        longest_match = functable.longest_match_slow;
 
     /* Process the input block. */
     for (;;) {
@@ -61,7 +61,7 @@ Z_INTERNAL block_state deflate_slow(deflate_state *s, int flush) {
              * of window index 0 (in particular we have to avoid a match
              * of the string with itself at the start of the input file).
              */
-            match_len = (*longest_match)(s, hash_head);
+            match_len = longest_match(s, hash_head);
             /* longest_match() sets match_start */
 
             if (match_len <= 5 && (s->strategy == Z_FILTERED)) {