summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-24 20:49:42 +0200
committerToomas Soome <tsoome@me.com>2019-07-18 09:14:13 +0300
commitd4d37f1b7f62fa7bc9abd7dcd34bc6d85dac69af (patch)
tree03b94d5e0d7987c50f364c7cc96156a852ea32bd /usr/src
parent0babfc55a001a1a55719ffeced558ec05d5ec38c (diff)
downloadillumos-joyent-d4d37f1b7f62fa7bc9abd7dcd34bc6d85dac69af.tar.gz
11387 look: NULL pointer errors
Reviewed by: Andy Fiddaman <andy@omniosce.org> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/look/look.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr/src/cmd/look/look.c b/usr/src/cmd/look/look.c
index d0b77a7cc5..9c5d1dbce7 100644
--- a/usr/src/cmd/look/look.c
+++ b/usr/src/cmd/look/look.c
@@ -4,15 +4,13 @@
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
-
-#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <ctype.h>
@@ -77,7 +75,7 @@ main(int argc, char **argv)
exit(2);
}
wstring = strdup(argv[1]);
- if (tab != NULL) {
+ if (tab != 0) {
if ((ptr = strchr(wstring, tab)) != NULL) {
*++ptr = '\0';
}