Skip to content

Commit

Permalink
Remove unused 's' parameter from HASH_CALC macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Dead2 committed Feb 23, 2024
1 parent a090529 commit ef2f8d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion arch/generic/insert_string_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion insert_string_roll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
10 changes: 5 additions & 5 deletions insert_string_tpl.h
Original file line number Diff line number Diff line change
@@ -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
*
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit ef2f8d5

Please sign in to comment.