summaryrefslogtreecommitdiff
path: root/source/fitz/image.c
diff options
context:
space:
mode:
authorSimon Bünzli <zeniko@gmail.com>2013-09-13 20:52:15 +0200
committerSimon Bünzli <zeniko@gmail.com>2013-09-27 16:24:26 +0200
commite6ad4dbd07ecffdb764a58977a013c862263355b (patch)
tree9e9a5489a9166995e0f988897c4034d953ae6058 /source/fitz/image.c
parent2c615e5aa18c7a34118605774de70b6b65f04b19 (diff)
downloadmupdf-e6ad4dbd07ecffdb764a58977a013c862263355b.tar.xz
stop checking if the result of fz_read is negative
fz_read used to return a negative value on errors. With the introduction of fz_try/fz_catch, it throws an error instead and always returns non-negative values. This removes the pointless checks.
Diffstat (limited to 'source/fitz/image.c')
-rw-r--r--source/fitz/image.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/source/fitz/image.c b/source/fitz/image.c
index 02610eef..bb1dc203 100644
--- a/source/fitz/image.c
+++ b/source/fitz/image.c
@@ -140,10 +140,6 @@ fz_decomp_image_from_stream(fz_context *ctx, fz_stream *stm, fz_image *image, in
samples = fz_malloc_array(ctx, h, stride);
len = fz_read(stm, samples, h * stride);
- if (len < 0)
- {
- fz_throw(ctx, FZ_ERROR_GENERIC, "cannot read image data");
- }
/* Make sure we read the EOF marker (for inline images only) */
if (in_line)