summaryrefslogtreecommitdiff
path: root/source/fitz/stream-read.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-11-13 12:05:44 +0100
committerTor Andersson <tor@ccxvii.net>2014-12-03 01:33:00 +0100
commit209544dea2f2e0b627a8b27a212681c1e9b8b7fc (patch)
tree535ac9066db7f52bea5f68164f366af0a65a0bdb /source/fitz/stream-read.c
parentd8ea0243dddb28bcc802e230a8de8e66513a7dbb (diff)
downloadmupdf-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.
Diffstat (limited to 'source/fitz/stream-read.c')
-rw-r--r--source/fitz/stream-read.c1
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;
}