From b40273e57d35fb2f7610ad13fa58c32658c42ff3 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Sat, 26 Jan 2019 18:19:33 +0200 Subject: 11439 tnf: NULL pointer errors Reviewed by: Andy Fiddaman Approved by: Dan McDonald --- usr/src/cmd/tnf/prex/spec.c | 6 ++---- usr/src/cmd/tnf/tnfxtract/tnfxtract.c | 4 +--- 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 #include #include @@ -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); -- cgit v1.2.3