Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Remove #ifdef DIAGNOSTIC around panic(). It is bet...



details:   https://anonhg.NetBSD.org/src/rev/9ac64ce66888
branches:  trunk
changeset: 526806:9ac64ce66888
user:      enami <enami%NetBSD.org@localhost>
date:      Sat May 11 11:56:57 2002 +0000

description:
Remove #ifdef DIAGNOSTIC around panic().  It is better than NULL pointer
dereference.

diffstat:

 sys/kern/kern_lock.c |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r b5a055cc99a2 -r 9ac64ce66888 sys/kern/kern_lock.c
--- a/sys/kern/kern_lock.c      Sat May 11 09:39:25 2002 +0000
+++ b/sys/kern/kern_lock.c      Sat May 11 11:56:57 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lock.c,v 1.60 2001/11/12 15:25:11 lukem Exp $     */
+/*     $NetBSD: kern_lock.c,v 1.61 2002/05/11 11:56:57 enami Exp $     */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.60 2001/11/12 15:25:11 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.61 2002/05/11 11:56:57 enami Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_lockdebug.h"
@@ -487,9 +487,7 @@
        else {
                if (p == NULL) {
                        if (!doing_shutdown) {
-#ifdef DIAGNOSTIC
                                panic("lockmgr: no context");
-#endif
                        } else {
                                p = &proc0;
                                if (panicstr && (!(flags & LK_NOWAIT))) {



Home | Main Index | Thread Index | Old Index