summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerman Semenoff <GermanAizek@yandex.ru>2026-02-09 17:19:55 +0300
committerHans Kristian Rosbach <hk-github@circlestorm.org>2026-02-16 22:44:35 +0100
commit84bdee0da5cfd5ff5a70d6c04701b30ce31e36f8 (patch)
tree0f8a1f45d6a8bfac24cf49ded7b611305056b894
parent3f81a5cb47e22d29d910e932cf77437d69305989 (diff)
downloadProject-Tick-84bdee0da5cfd5ff5a70d6c04701b30ce31e36f8.tar.gz
Project-Tick-84bdee0da5cfd5ff5a70d6c04701b30ce31e36f8.zip
deflate_medium: more readability initialize structs match
-rw-r--r--deflate_medium.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/deflate_medium.c b/deflate_medium.c
index 3849beeb99..668b2d4c39 100644
--- a/deflate_medium.c
+++ b/deflate_medium.c
@@ -163,15 +163,12 @@ static void fizzle_matches(deflate_state *s, struct match *current, struct match
Z_INTERNAL block_state deflate_medium(deflate_state *s, int flush) {
/* Align the first struct to start on a new cacheline, this allows us to fit both structs in one cacheline */
- ALIGNED_(16) struct match current_match;
- struct match next_match;
+ ALIGNED_(16) struct match current_match = {0};
+ struct match next_match = {0};
/* For levels below 5, don't check the next position for a better match */
int early_exit = s->level < 5;
- memset(&current_match, 0, sizeof(struct match));
- memset(&next_match, 0, sizeof(struct match));
-
for (;;) {
uint32_t hash_head = 0; /* head of the hash chain */
int bflush = 0; /* set if current block must be flushed */