]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
IMPORT: slz: declare len to fix debug build when optimal match is enabled
authorWilly Tarreau <w@1wt.eu>
Mon, 13 Dec 2021 08:07:05 +0000 (09:07 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Nov 2022 10:14:02 +0000 (11:14 +0100)
Building with -DFIND_OPTIMAL_MATCH would fail on undeclared "len".
This one likely vanished in some cleanup.

This is libslz upstream commit 1ea20360715e1ad0cd81db83fa4361310716b8cc

src/slz.c

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