diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfclean.c | 2 | ||||
-rw-r--r-- | apps/pdfdraw.c | 4 | ||||
-rw-r--r-- | apps/pdfextract.c | 2 | ||||
-rw-r--r-- | apps/pdfinfo.c | 2 | ||||
-rw-r--r-- | apps/win_main.c | 6 | ||||
-rw-r--r-- | apps/x11_image.c | 2 | ||||
-rw-r--r-- | apps/x11_main.c | 6 | ||||
-rw-r--r-- | apps/xpsdraw.c | 4 |
8 files changed, 14 insertions, 14 deletions
diff --git a/apps/pdfclean.c b/apps/pdfclean.c index 58453cfb..56d78082 100644 --- a/apps/pdfclean.c +++ b/apps/pdfclean.c @@ -785,7 +785,7 @@ int main(int argc, char **argv) /* Do not renumber objects if encryption is in use, as the object * numbers are baked into the streams/strings, and we can't currently * cope with moving them. See bug 692627. */ - if (dogarbage >= 2 && xref->crypt == NULL) + if (dogarbage >= 2 && !xref->crypt) renumberobjs(); writepdf(); diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c index ff9f72a3..861d2b3f 100644 --- a/apps/pdfdraw.c +++ b/apps/pdfdraw.c @@ -363,9 +363,9 @@ int main(int argc, char **argv) fz_accelerate(); ctx = fz_new_context(&fz_alloc_default); - if (ctx == NULL) + if (!ctx) { - fprintf(stderr, "cannot init context\n"); + fprintf(stderr, "cannot initialise context\n"); exit(1); } diff --git a/apps/pdfextract.c b/apps/pdfextract.c index cb03d745..c32a25c5 100644 --- a/apps/pdfextract.c +++ b/apps/pdfextract.c @@ -127,7 +127,7 @@ static void savefont(fz_obj *dict, int num) printf("extracting font %s\n", name); f = fopen(name, "wb"); - if (f == NULL) + if (!f) fz_throw(ctx, "Error creating font file"); n = fwrite(buf->data, 1, buf->len, f); diff --git a/apps/pdfinfo.c b/apps/pdfinfo.c index 171317c9..bfa5f3b1 100644 --- a/apps/pdfinfo.c +++ b/apps/pdfinfo.c @@ -976,7 +976,7 @@ int main(int argc, char **argv) ctx = fz_new_context(&fz_alloc_default); if (!ctx) { - fprintf(stderr, "cannot initialise context"); + fprintf(stderr, "cannot initialise context\n"); exit(1); } 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); diff --git a/apps/x11_image.c b/apps/x11_image.c index 9383c545..35b32c7e 100644 --- a/apps/x11_image.c +++ b/apps/x11_image.c @@ -285,7 +285,7 @@ create_pool(void) info.pool[i] = createximage(info.display, info.visual.visual, &info.shminfo[i], info.visual.depth, WIDTH, HEIGHT); - if (info.pool[i] == NULL) { + if (!info.pool[i]) { return 0; } } 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); } diff --git a/apps/xpsdraw.c b/apps/xpsdraw.c index 8b15ef3e..a7223574 100644 --- a/apps/xpsdraw.c +++ b/apps/xpsdraw.c @@ -315,9 +315,9 @@ int main(int argc, char **argv) fz_accelerate(); 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); } |