aboutsummaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/decompress.c8
2 files changed, 11 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0c0583684dc..d89f702a2aa 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12013-08-13 Paul Eggert <eggert@cs.ucla.edu>
2
3 * decompress.c: Minor simplifications.
4 (Fzlib_decompress_region): Don't bother verifying
5 that avail_out <= UINT_MAX, as that was confusing.
6 Mention the restriction in a comment instead.
7 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
8
12013-08-13 Jan Djärv <jan.h.d@swipnet.se> 92013-08-13 Jan Djärv <jan.h.d@swipnet.se>
2 10
3 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5 11 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
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);