summaryrefslogtreecommitdiff
path: root/pdf/pdf_interpret.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-12-08 23:36:20 +0100
committerTor Andersson <tor.andersson@artifex.com>2011-12-08 23:36:20 +0100
commit2af3baffb58f22ddf3ac5944d2677b981763e03d (patch)
tree70d1dfc4ea490b053072b2ea68ad250b8a96972e /pdf/pdf_interpret.c
parent62ff8552500694c96b998d2aac6fbc47ab2d9395 (diff)
downloadmupdf-2af3baffb58f22ddf3ac5944d2677b981763e03d.tar.xz
Stylistic changes when testing pointer values for NULL.
Also: use 'cannot' instead of 'failed to' in error messages.
Diffstat (limited to 'pdf/pdf_interpret.c')
-rw-r--r--pdf/pdf_interpret.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pdf/pdf_interpret.c b/pdf/pdf_interpret.c
index b82b4297..b6089ca0 100644
--- a/pdf/pdf_interpret.c
+++ b/pdf/pdf_interpret.c
@@ -112,7 +112,7 @@ ocg_intents_include(pdf_ocg_descriptor *desc, char *name)
return 1;
/* In the absence of a specified intent, it's 'View' */
- if (desc->intent == NULL)
+ if (!desc->intent)
return (strcmp(name, "View") == 0);
if (fz_is_name(desc->intent))
@@ -146,7 +146,7 @@ pdf_is_hidden_ocg(fz_obj *ocg, pdf_csi *csi, fz_obj *rdb)
pdf_ocg_descriptor *desc = csi->xref->ocg;
/* If no ocg descriptor, everything is visible */
- if (desc == NULL)
+ if (!desc)
return 0;
/* If we've been handed a name, look it up in the properties. */
@@ -155,7 +155,7 @@ pdf_is_hidden_ocg(fz_obj *ocg, pdf_csi *csi, fz_obj *rdb)
ocg = fz_dict_gets(fz_dict_gets(rdb, "Properties"), fz_to_name(ocg));
}
/* If we haven't been given an ocg at all, then we're visible */
- if (ocg == NULL)
+ if (!ocg)
return 0;
fz_strlcpy(event_state, csi->event, sizeof event_state);
@@ -1469,7 +1469,7 @@ static void pdf_run_BDC(pdf_csi *csi, fz_obj *rdb)
}
ocg = fz_dict_gets(fz_dict_gets(rdb, "Properties"), csi->name);
- if (ocg == NULL)
+ if (!ocg)
{
/* No Properties array, or name not found in the properties
* means visible. */