From: Herman Semenoff Date: Mon, 9 Feb 2026 14:19:55 +0000 (+0300) Subject: deflate_medium: more readability initialize structs match X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84bdee0da5cfd5ff5a70d6c04701b30ce31e36f8;p=thirdparty%2Fzlib-ng.git deflate_medium: more readability initialize structs match --- diff --git a/deflate_medium.c b/deflate_medium.c index 3849beeb9..668b2d4c3 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(¤t_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 */