IMPORT: slz: declare len to fix debug build when optimal match is enabled

Building with -DFIND_OPTIMAL_MATCH would fail on undeclared "len".
This one likely vanished in some cleanup.

This is libslz upstream commit 1ea20360715e1ad0cd81db83fa4361310716b8cc
This commit is contained in:
Willy Tarreau 2021-12-13 09:07:05 +01:00
parent eab4256a9c
commit eda36f1c23
1 changed files with 2 additions and 0 deletions

View File

@ -578,6 +578,8 @@ long slz_rfc1951_encode(struct slz_stream *strm, unsigned char *out, const unsig
int max_lookup = 2; // 0 = no limit int max_lookup = 2; // 0 = no limit
for (scan = pos - 1; scan < pos && (unsigned long)(pos - scan - 1) < 32768; scan--) { for (scan = pos - 1; scan < pos && (unsigned long)(pos - scan - 1) < 32768; scan--) {
int len;
if (*(uint32_t *)(in + scan) != word) if (*(uint32_t *)(in + scan) != word)
continue; continue;