]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove unused 's' parameter from HASH_CALC macro
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 21 Feb 2024 11:06:16 +0000 (12:06 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 23 Feb 2024 12:34:10 +0000 (13:34 +0100)
arch/generic/insert_string_c.c
insert_string_roll.c
insert_string_tpl.h

index 3e1e03842e46ad73b30890d87abe5c89cf39449f..2c6631e1c69d6576a6911a8e20634329c5bdc181 100644 (file)
@@ -10,7 +10,7 @@
 
 #define HASH_SLIDE           16
 
-#define HASH_CALC(s, h, val) h = ((val * 2654435761U) >> HASH_SLIDE);
+#define HASH_CALC(h, val)    h = ((val * 2654435761U) >> HASH_SLIDE);
 #define HASH_CALC_VAR        h
 #define HASH_CALC_VAR_INIT   uint32_t h = 0
 
index 4dbf0d4a1c6b1fff60e79246a260470598a3657c..8693f96f59021edfcdd4ac67fbb8236d200c5355 100644 (file)
@@ -10,7 +10,7 @@
 
 #define HASH_SLIDE           5
 
-#define HASH_CALC(s, h, val) h = ((h << HASH_SLIDE) ^ ((uint8_t)val))
+#define HASH_CALC(h, val)    h = ((h << HASH_SLIDE) ^ ((uint8_t)val))
 #define HASH_CALC_VAR        s->ins_h
 #define HASH_CALC_VAR_INIT
 #define HASH_CALC_READ       val = strstart[0]
index bfadc5de9e454c4cb01a2360716a1e44833846c2..281c0134631048c75fd10571a2aef2cbcb112a56 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef INSERT_STRING_H_
 #define INSERT_STRING_H_
 
-/* insert_string.h -- Private insert_string functions shared with more than
- *                    one insert string implementation
+/* insert_string_tpl.h -- Private insert_string functions shared with more than
+ *                        one insert string implementation
  *
  * Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
  *
@@ -48,7 +48,7 @@
  *    previous key instead of complete recalculation each time.
  */
 Z_INTERNAL uint32_t UPDATE_HASH(uint32_t h, uint32_t val) {
-    HASH_CALC(s, h, val);
+    HASH_CALC(h, val);
     return h & HASH_CALC_MASK;
 }
 
@@ -64,7 +64,7 @@ Z_INTERNAL Pos QUICK_INSERT_STRING(deflate_state *const s, uint32_t str) {
 
     HASH_CALC_VAR_INIT;
     HASH_CALC_READ;
-    HASH_CALC(s, HASH_CALC_VAR, val);
+    HASH_CALC(HASH_CALC_VAR, val);
     HASH_CALC_VAR &= HASH_CALC_MASK;
     hm = HASH_CALC_VAR;
 
@@ -93,7 +93,7 @@ Z_INTERNAL void INSERT_STRING(deflate_state *const s, uint32_t str, uint32_t cou
 
         HASH_CALC_VAR_INIT;
         HASH_CALC_READ;
-        HASH_CALC(s, HASH_CALC_VAR, val);
+        HASH_CALC(HASH_CALC_VAR, val);
         HASH_CALC_VAR &= HASH_CALC_MASK;
         hm = HASH_CALC_VAR;