From 5aabce7698f02b074e59ad807f118643d4b6a5f8 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sun, 27 May 2007 17:27:59 +0000 Subject: [PATCH] Don't check curproc->p_comm for NULL as it is an array allocated as part of struct proc. Found with: Coverity Prevent(tm) CID: 2096 --- sys/i386/i386/trap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 1bb26878453b..3fb3d2c9eb6f 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -854,9 +854,7 @@ trap_fatal(frame, eva) printf("IOPL = %d\n", (frame->tf_eflags & PSL_IOPL) >> 12); printf("current process = "); if (curproc) { - printf("%lu (%s)\n", - (u_long)curproc->p_pid, curproc->p_comm ? - curproc->p_comm : ""); + printf("%lu (%s)\n", (u_long)curproc->p_pid, curproc->p_comm); } else { printf("Idle\n"); }