From 209544dea2f2e0b627a8b27a212681c1e9b8b7fc Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 13 Nov 2014 12:05:44 +0100 Subject: 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. --- source/fitz/stream-read.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source/fitz/stream-read.c') 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; } -- cgit v1.2.3