diff options
author | dim <dim@FreeBSD.org> | 2015-06-20 13:25:28 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-06-20 13:25:28 +0000 |
commit | f96f7b3d8f68b5f257892ac5f18061670af64ed4 (patch) | |
tree | 25e2505e05656cffa1adb588a1687478018afcf7 | |
parent | 094ec02dc8b783e4e68794c847da90049af29806 (diff) | |
download | FreeBSD-src-f96f7b3d8f68b5f257892ac5f18061670af64ed4.zip FreeBSD-src-f96f7b3d8f68b5f257892ac5f18061670af64ed4.tar.gz |
MFC r284167:
Merge r283870 from amd64:
Remove unneeded NULL checks in trap_fatal().
Since td_name is an array member of struct thread, it can never be NULL,
so the check can be removed. In addition, curproc can never be NULL,
so remove the if statement, and splice the two printfs() together.
While here, remove the u_long cast, and use the correct printf format
specifier for curproc->p_pid.
Requested by: jhb
-rw-r--r-- | sys/i386/i386/trap.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 1bf76bd..2fcf690 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -1001,12 +1001,8 @@ trap_fatal(frame, eva) if (frame->tf_eflags & PSL_VM) printf("vm86, "); printf("IOPL = %d\n", (frame->tf_eflags & PSL_IOPL) >> 12); - printf("current process = "); - if (curproc) { - printf("%lu (%s)\n", (u_long)curproc->p_pid, curthread->td_name); - } else { - printf("Idle\n"); - } + printf("current process = %d (%s)\n", + curproc->p_pid, curthread->td_name); #ifdef KDB if (debugger_on_panic || kdb_active) { |