summaryrefslogtreecommitdiff
path: root/fitz/base_getopt.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 /fitz/base_getopt.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 'fitz/base_getopt.c')
-rw-r--r--fitz/base_getopt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/base_getopt.c b/fitz/base_getopt.c
index 2c198ba1..2a6e5ac4 100644
--- a/fitz/base_getopt.c
+++ b/fitz/base_getopt.c
@@ -25,7 +25,7 @@ getopt(int argc, char *argv[], char *optstring)
optarg = NULL;
- if (scan == NULL || *scan == '\0') {
+ if (!scan || *scan == '\0') {
if (optind == 0)
optind++;
@@ -43,7 +43,7 @@ getopt(int argc, char *argv[], char *optstring)
c = *scan++;
place = strchr(optstring, c);
- if (place == NULL || c == ':') {
+ if (!place || c == ':') {
fprintf(stderr, "%s: unknown option -%c\n", argv[0], c);
return '?';
}