Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86_64/x86_64 Don't deref l if it's NULL, please.



details:   https://anonhg.NetBSD.org/src/rev/74588d75c0f8
branches:  trunk
changeset: 542494:74588d75c0f8
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Thu Jan 30 22:45:20 2003 +0000

description:
Don't deref l if it's NULL, please.

diffstat:

 sys/arch/x86_64/x86_64/trap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 9a029b4ad9ad -r 74588d75c0f8 sys/arch/x86_64/x86_64/trap.c
--- a/sys/arch/x86_64/x86_64/trap.c     Thu Jan 30 21:43:26 2003 +0000
+++ b/sys/arch/x86_64/x86_64/trap.c     Thu Jan 30 22:45:20 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.10 2003/01/30 02:03:35 fvdl Exp $   */
+/*     $NetBSD: trap.c,v 1.11 2003/01/30 22:45:20 fvdl Exp $   */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -168,7 +168,7 @@
        struct trapframe frame;
 {
        struct lwp *l = curlwp;
-       struct proc *p = l->l_proc;
+       struct proc *p = l ? l->l_proc : 0;
        int type = (int)frame.tf_trapno;
        struct pcb *pcb;
        extern char fusuintrfailure[],
@@ -183,7 +183,7 @@
 
        uvmexp.traps++;
 
-       pcb = (p != NULL) ? &l->l_addr->u_pcb : NULL;
+       pcb = (l != NULL) ? &l->l_addr->u_pcb : NULL;
 
 #ifdef DEBUG
        if (trapdebug) {



Home | Main Index | Thread Index | Old Index