summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHans Kristian Rosbach <hk-git@circlestorm.org>2021-12-13 22:30:58 +0100
committerHans Kristian Rosbach <hk-github@circlestorm.org>2021-12-24 12:52:14 +0100
commit8a378ba9b85e23a6e2e67b01a1b3d738e86faefe (patch)
treee9e0dc35c97219e5b7276f5c026f28ab6e9f02dd /test
parent2faaf5bbc993c09f7344353b824e1c1ad585627f (diff)
Fix deflateBound and compressBound returning very small size estimates.
Remove workaround in switchlevels.c, so we do actual testing of this. Use named defines instead of magic numbers where we can.
Diffstat (limited to 'test')
-rw-r--r--test/switchlevels.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/switchlevels.c b/test/switchlevels.c
index a4ec4b7..1e1fb00 100644
--- a/test/switchlevels.c
+++ b/test/switchlevels.c
@@ -68,7 +68,7 @@ static int compress_chunk(PREFIX3(stream) *strm, int level, int size, int last)
goto done;
}
- compsize = 100 + 2 * PREFIX(deflateBound)(strm, size);
+ compsize = PREFIX(deflateBound)(strm, size);
buf = malloc(size + compsize);
if (buf == NULL) {
fprintf(stderr, "Out of memory\n");