Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 Replace DIAGNOSTIC & panic with KASSERT



details:   https://anonhg.NetBSD.org/src/rev/470c12f8f96c
branches:  trunk
changeset: 815461:470c12f8f96c
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu May 19 03:11:42 2016 +0000

description:
Replace DIAGNOSTIC & panic with KASSERT

diffstat:

 sys/netinet6/scope6.c |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (32 lines):

diff -r 86bb1411453f -r 470c12f8f96c sys/netinet6/scope6.c
--- a/sys/netinet6/scope6.c     Wed May 18 16:36:53 2016 +0000
+++ b/sys/netinet6/scope6.c     Thu May 19 03:11:42 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scope6.c,v 1.12 2016/04/26 08:44:45 ozaki-r Exp $      */
+/*     $NetBSD: scope6.c,v 1.13 2016/05/19 03:11:42 ozaki-r Exp $      */
 /*     $KAME$  */
 
 /*-
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scope6.c,v 1.12 2016/04/26 08:44:45 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scope6.c,v 1.13 2016/05/19 03:11:42 ozaki-r Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -380,12 +380,7 @@
        uint32_t zoneid = 0;
        const struct scope6_id *sid = SID(ifp);
 
-#ifdef DIAGNOSTIC
-       if (sid == NULL) { /* should not happen */
-               panic("in6_setscope: scope array is NULL");
-               /* NOTREACHED */
-       }
-#endif
+       KASSERT(sid != NULL);
 
        /*
         * special case: the loopback address can only belong to a loopback



Home | Main Index | Thread Index | Old Index