summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-28 15:44:34 +0200
committerJoshua M. Clulow <josh@sysmgr.org>2020-04-06 21:07:23 -0700
commit33119c8b2ee152d0614d09fb413393430a97a6bf (patch)
treec33f1e6edeb51a36b087219fa1b63e52097776ba
parenta7fb1da4f1ff02974ca64d25c8d983fd1c1f3ccc (diff)
downloadillumos-gate-33119c8b2ee152d0614d09fb413393430a97a6bf.tar.gz
10316 tic: NULL pointer errors
Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/tic/tic_scan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/cmd/tic/tic_scan.c b/usr/src/cmd/tic/tic_scan.c
index fa21e9c086..c0f748f27f 100644
--- a/usr/src/cmd/tic/tic_scan.c
+++ b/usr/src/cmd/tic/tic_scan.c
@@ -24,7 +24,7 @@
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
/*
@@ -231,9 +231,9 @@ get_token()
case '=':
ch = trans_string(ptr);
- if (ch != NULL && ch != ',')
+ if (ch != '\0' && ch != ',')
warning("Missing comma");
- if (ch == NULL)
+ if (ch == '\0')
warning("NULL string value");
curr_token.tk_name = buffer;
curr_token.tk_valstring = ptr;
@@ -301,7 +301,7 @@ get_token()
* Returns the next character in the input stream. Comments and leading
* white space are stripped. The global state variable 'firstcolumn' is
* set TRUE if the character returned is from the first column of the
- * inputline. The global variable curr_line is incremented for each new.
+ * inputline. The global variable curr_line is incremented for each new.
* line. The global variable curr_file_pos is set to the file offset
* of the beginning of each line.
*
@@ -493,7 +493,7 @@ trans_string(char *ptr)
*ptr = '\0';
if (count == 0)
- return (NULL);
+ return (0);
return (ch);
}