summaryrefslogtreecommitdiff
path: root/apps/x11_main.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 /apps/x11_main.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 'apps/x11_main.c')
-rw-r--r--apps/x11_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/x11_main.c b/apps/x11_main.c
index b875bc6a..23649a57 100644
--- a/apps/x11_main.c
+++ b/apps/x11_main.c
@@ -337,7 +337,7 @@ static void winblit(pdfapp_t *app)
{
int i = gapp.image->w*gapp.image->h;
unsigned char *color = malloc(i*4);
- if (color != NULL)
+ if (color)
{
unsigned char *s = gapp.image->samples;
unsigned char *d = color;
@@ -588,9 +588,9 @@ int main(int argc, char **argv)
struct timeval *timeout;
ctx = fz_new_context(&fz_alloc_default);
- if (ctx == NULL)
+ if (!ctx)
{
- fprintf(stderr, "failed to initialise context");
+ fprintf(stderr, "cannot initialise context\n");
exit(1);
}