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 /apps/win_main.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 'apps/win_main.c')
-rw-r--r-- | apps/win_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/win_main.c b/apps/win_main.c index a64d1b08..99214904 100644 --- a/apps/win_main.c +++ b/apps/win_main.c @@ -340,7 +340,7 @@ void winopen() /* Init DIB info for buffer */ dibinf = malloc(sizeof(BITMAPINFO) + 12); - assert(dibinf != NULL); + assert(dibinf); dibinf->bmiHeader.biSize = sizeof(dibinf->bmiHeader); dibinf->bmiHeader.biPlanes = 1; dibinf->bmiHeader.biBitCount = 32; @@ -832,9 +832,9 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow fz_accelerate(); ctx = fz_new_context(&fz_alloc_default); - if (ctx == NULL) + if (!ctx) { - fprintf(stderr, "cannot init context"); + fprintf(stderr, "cannot initialise context\n"); exit(1); } pdfapp_init(ctx, &gapp); |