aboutsummaryrefslogtreecommitdiffstats
path: root/src/decompress.c
diff options
context:
space:
mode:
authorPaul Eggert2013-08-13 14:17:09 -0700
committerPaul Eggert2013-08-13 14:17:09 -0700
commit2d065031e4f2010b41e64fed1d9c7f9a4b3e5091 (patch)
tree92d35a7926c6e97bebcff7395ad26d88481bc38c /src/decompress.c
parenta5bd5abb645ea5c0e5bb45425128166af44dc237 (diff)
downloademacs-2d065031e4f2010b41e64fed1d9c7f9a4b3e5091.tar.gz
emacs-2d065031e4f2010b41e64fed1d9c7f9a4b3e5091.zip
* decompress.c: Minor simplifications.
(Fzlib_decompress_region): Don't bother verifying that avail_out <= UINT_MAX, as that was confusing. Mention the restriction in a comment instead. Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
Diffstat (limited to 'src/decompress.c')
-rw-r--r--src/decompress.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/decompress.c b/src/decompress.c
index 452a9210402..c54a34e050e 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -183,12 +183,10 @@ This function can be called only in unibyte buffers. */)
183 { 183 {
184 /* Maximum number of bytes that one 'inflate' call should read and write. 184 /* Maximum number of bytes that one 'inflate' call should read and write.
185 Do not make avail_out too large, as that might unduly delay C-g. 185 Do not make avail_out too large, as that might unduly delay C-g.
186 In any case zlib requires that these values not exceed UINT_MAX. */ 186 zlib requires that avail_in and avail_out not exceed UINT_MAX. */
187 ptrdiff_t avail_in = min (iend - pos_byte, UINT_MAX); 187 ptrdiff_t avail_in = min (iend - pos_byte, UINT_MAX);
188 enum { avail_out = 1 << 14 }; 188 int avail_out = 16 * 1024;
189 verify (avail_out <= UINT_MAX); 189 int decompressed;
190
191 ptrdiff_t decompressed;
192 190
193 if (GAP_SIZE < avail_out) 191 if (GAP_SIZE < avail_out)
194 make_gap (avail_out - GAP_SIZE); 192 make_gap (avail_out - GAP_SIZE);