summaryrefslogtreecommitdiff
path: root/source/xps
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-02-13 12:16:06 +0100
committerTor Andersson <tor.andersson@artifex.com>2015-02-17 18:06:11 +0100
commit6cc97e85489f5e4e39aa185d17ad5e35b09dddb5 (patch)
tree336b711593d85f80d89da363d1ae269dcdf9b159 /source/xps
parentf84a189d5f94250e46d2cbd1a75aba00130e2dd6 (diff)
downloadmupdf-6cc97e85489f5e4e39aa185d17ad5e35b09dddb5.tar.xz
Remove pointless return value checks when calling fz_open_file.
fz_open_file does not return NULL on failure -- it throws an exception!
Diffstat (limited to 'source/xps')
-rw-r--r--source/xps/xps-zip.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source/xps/xps-zip.c b/source/xps/xps-zip.c
index ab8c60d7..3759c4b6 100644
--- a/source/xps/xps-zip.c
+++ b/source/xps/xps-zip.c
@@ -182,21 +182,14 @@ xps_open_document(fz_context *ctx, const char *filename)
}
file = fz_open_file(ctx, filename);
- if (!file)
- fz_throw(ctx, FZ_ERROR_GENERIC, "cannot open file '%s': %s", filename, strerror(errno));
fz_try(ctx)
- {
doc = xps_open_document_with_stream(ctx, file);
- }
fz_always(ctx)
- {
fz_drop_stream(ctx, file);
- }
fz_catch(ctx)
- {
fz_rethrow_message(ctx, "cannot load document '%s'", filename);
- }
+
return doc;
}