summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-26 18:19:33 +0200
committerToomas Soome <tsoome@me.com>2019-07-30 23:08:43 +0300
commitb40273e57d35fb2f7610ad13fa58c32658c42ff3 (patch)
treef346313a65d1ce0ce2b40c4f2ac38494f731df3b
parente8bca4ea3a0f5e2a084777440ee86870f8c9d88f (diff)
downloadillumos-joyent-b40273e57d35fb2f7610ad13fa58c32658c42ff3.tar.gz
11439 tnf: NULL pointer errors
Reviewed by: Andy Fiddaman <andy@omniosce.org> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/tnf/prex/spec.c6
-rw-r--r--usr/src/cmd/tnf/tnfxtract/tnfxtract.c4
2 files changed, 3 insertions, 7 deletions
diff --git a/usr/src/cmd/tnf/prex/spec.c b/usr/src/cmd/tnf/prex/spec.c
index 159212d8e6..d8d125fa45 100644
--- a/usr/src/cmd/tnf/prex/spec.c
+++ b/usr/src/cmd/tnf/prex/spec.c
@@ -23,8 +23,6 @@
* Copyright (c) 1994, by Sun Microsytems, Inc.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Includes
*/
@@ -185,7 +183,7 @@ spec_match(spec_t * spec_p,
return ((strcmp(spec_p->str, str) == 0));
case SPEC_REGEXP:
- return ((step(str, spec_p->regexp_p) != NULL));
+ return ((step(str, spec_p->regexp_p) != 0));
}
return (B_FALSE);
@@ -317,7 +315,7 @@ spec_valtrav(spec_t * spec_p,
}
for (s = s0 = valstr; ; s++) {
switch (*s) {
- case NULL:
+ case '\0':
if (intoken) {
if (spec_match(spec_p, s0))
(*fun) (spec_p, s0, calldatap);
diff --git a/usr/src/cmd/tnf/tnfxtract/tnfxtract.c b/usr/src/cmd/tnf/tnfxtract/tnfxtract.c
index 5e48d6094d..9e1ac13d61 100644
--- a/usr/src/cmd/tnf/tnfxtract/tnfxtract.c
+++ b/usr/src/cmd/tnf/tnfxtract/tnfxtract.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -128,7 +126,7 @@ dumpfile_init()
"kvm_read error in %s\n"), dumpfile);
exit(1);
}
- if (dump_bufaddr == NULL || tnf_bufsize == 0) {
+ if (dump_bufaddr == (uintptr_t)NULL || tnf_bufsize == 0) {
(void) fprintf(stderr, gettext(
"No trace data available in the kernel.\n"));
exit(1);