diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2014-11-13 12:05:44 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2014-12-03 01:33:00 +0100 |
commit | 209544dea2f2e0b627a8b27a212681c1e9b8b7fc (patch) | |
tree | 535ac9066db7f52bea5f68164f366af0a65a0bdb | |
parent | d8ea0243dddb28bcc802e230a8de8e66513a7dbb (diff) | |
download | mupdf-209544dea2f2e0b627a8b27a212681c1e9b8b7fc.tar.xz |
Don't always trim the buffer when calling fz_read_all.
Many instances just use the data and free it, so reallocing to shrink
is a waste of time. Other instances need to append a terminating zero,
such as the XML and CSS parsers.
-rw-r--r-- | source/fitz/stream-read.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/source/fitz/stream-read.c b/source/fitz/stream-read.c index 02f186a0..de314fe4 100644 --- a/source/fitz/stream-read.c +++ b/source/fitz/stream-read.c @@ -86,7 +86,6 @@ fz_read_best(fz_stream *stm, int initial, int *truncated) fz_rethrow(ctx); } } - fz_trim_buffer(ctx, buf); return buf; } |