diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-12-08 23:36:20 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-12-08 23:36:20 +0100 |
commit | 2af3baffb58f22ddf3ac5944d2677b981763e03d (patch) | |
tree | 70d1dfc4ea490b053072b2ea68ad250b8a96972e /fitz/res_font.c | |
parent | 62ff8552500694c96b998d2aac6fbc47ab2d9395 (diff) | |
download | mupdf-2af3baffb58f22ddf3ac5944d2677b981763e03d.tar.xz |
Stylistic changes when testing pointer values for NULL.
Also: use 'cannot' instead of 'failed to' in error messages.
Diffstat (limited to 'fitz/res_font.c')
-rw-r--r-- | fitz/res_font.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fitz/res_font.c b/fitz/res_font.c index 3fea732a..60374746 100644 --- a/fitz/res_font.c +++ b/fitz/res_font.c @@ -131,9 +131,9 @@ void fz_new_font_context(fz_context *ctx) void fz_free_font_context(fz_context *ctx) { - if (ctx->font == NULL) + if (!ctx->font) return; - /* assert(ctx->ftlib == NULL); */ + /* assert(!ctx->ftlib); */ /* assert(ctx->ftlib_refs == 0); */ fz_free(ctx, ctx->font); } @@ -147,7 +147,7 @@ char *ft_error_string(int err) { const struct ft_error *e; - for (e = ft_errors; e->str != NULL; e++) + for (e = ft_errors; e->str; e++) if (e->err == err) return e->str; @@ -553,7 +553,7 @@ fz_render_t3_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm, fz_co } else if (dev->flags & FZ_CHARPROC_COLOR) { - if (model == NULL) + if (!model) fz_warn(ctx, "colored type3 glyph wanted in masked context"); } else @@ -579,7 +579,7 @@ fz_render_t3_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm, fz_co fz_free_device(dev); fz_free_glyph_cache(ctx, cache); - if (model == NULL) + if (!model) { result = fz_alpha_from_gray(ctx, glyph, 0); fz_drop_pixmap(ctx, glyph); |