summaryrefslogtreecommitdiff
path: root/usr/src/cmd/tic
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-28 15:44:34 +0200
committerDan McDonald <danmcd@joyent.com>2019-01-28 17:45:37 -0500
commit3f4e8cf5ba66371b07c889489d052e8b346d2c3f (patch)
tree08d5b578fe8328e641a06673cc876f113ebf866c /usr/src/cmd/tic
parent1de1e652632a9912511ab1cd8c8c4628d5e5f1da (diff)
downloadillumos-gate-3f4e8cf5ba66371b07c889489d052e8b346d2c3f.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>
Diffstat (limited to 'usr/src/cmd/tic')
-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);
}