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/987a92f628d1
branches:  trunk
changeset: 345319:987a92f628d1
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 b716a4fe5b4c -r 987a92f628d1 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