>From e37e9254364704952bc380e7538dc835a534dec4 Mon Sep 17 00:00:00 2001 From: Frank Dittrich Date: Wed, 4 Jul 2012 18:34:23 +0200 Subject: [PATCH] pdf2john.c: compare pointer to NULL, not to 0 Problem found and source code changed using coccinelle script http://www.emn.fr/z-info/coccinelle/rules/badzero.cocci --- src/pdf2john.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/pdf2john.c b/src/pdf2john.c index 08bc761..8a5faa8 100644 --- a/src/pdf2john.c +++ b/src/pdf2john.c @@ -95,7 +95,7 @@ int pdf2john(int argc, char **argv) goto cleanup; } - if ((file = fopen(inputfile, "r")) == 0) { + if ((file = fopen(inputfile, "r")) == NULL) { fprintf(stderr, "Error: file %s not found\n", inputfile); ret = 2; goto cleanup; -- 1.7.7.6