summaryrefslogtreecommitdiff
path: root/source/gprf
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-10-12 12:18:18 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-10-12 14:45:42 +0200
commit0bb6e0b11cf2fda4ecdb89a6407d919c6ed328f5 (patch)
tree9eda479951c3dbe2ee0cd2ea9417e3a4a829044d /source/gprf
parentca8d9898719671627231c9d909cfd9ba252ab4a2 (diff)
downloadmupdf-0bb6e0b11cf2fda4ecdb89a6407d919c6ed328f5.tar.xz
Remove superfluous context null checks.
Code MUST pass a non-null context to all functions. Checking ctx for null and failing silently is no more useful than segfaulting. fz_keep_imp and fz_drop_imp handle NULL pointers safely, so the NULL checks for this can also be dropped at the same time.
Diffstat (limited to 'source/gprf')
-rw-r--r--source/gprf/gprf-doc.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/source/gprf/gprf-doc.c b/source/gprf/gprf-doc.c
index 8d6b3b32..9f9d5ebb 100644
--- a/source/gprf/gprf-doc.c
+++ b/source/gprf/gprf-doc.c
@@ -88,18 +88,12 @@ fz_new_gprf_file(fz_context *ctx, char *filename)
static gprf_file *
fz_keep_gprf_file(fz_context *ctx, gprf_file *file)
{
- if (!ctx || !file)
- return NULL;
-
return fz_keep_imp(ctx, file, &file->refs);
}
static void
fz_drop_gprf_file(fz_context *ctx, gprf_file *file)
{
- if (!ctx || !file)
- return;
-
if (fz_drop_imp(ctx, file, &file->refs))
{
unlink(file->filename);