summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-10-06 11:56:24 +0100
committerRobin Watts <robin.watts@artifex.com>2016-10-06 11:57:08 +0100
commit7dc527887927cb0f3b2e41ccc2913ff57d3d820d (patch)
tree643264e3b15a0fd12106df590e0b684848c32ccf
parent80d6490e6d54f822de6d36219ce08e6a8ad33137 (diff)
downloadmupdf-7dc527887927cb0f3b2e41ccc2913ff57d3d820d.tar.xz
Squash compiler warning.
font->name can never be NULL as it is an array.
-rw-r--r--source/fitz/font.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/fitz/font.c b/source/fitz/font.c
index b22781e4..c5e6503e 100644
--- a/source/fitz/font.c
+++ b/source/fitz/font.c
@@ -1545,9 +1545,7 @@ fz_encode_character_with_fallback(fz_context *ctx, fz_font *user_font, int unico
const char *fz_font_name(fz_font *font)
{
- if (font == NULL || font->name == NULL)
- return "";
- return font->name;
+ return font ? font->name : "";
}
fz_buffer **fz_font_t3_procs(fz_font *font)