Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 convert a DIAGNOSTIC / panic into a KASSERTMSG().



details:   https://anonhg.NetBSD.org/src/rev/2eb6d38eccb7
branches:  trunk
changeset: 790600:2eb6d38eccb7
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Oct 18 02:20:15 2013 +0000

description:
convert a DIAGNOSTIC / panic into a KASSERTMSG().

diffstat:

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

diffs (32 lines):

diff -r b460bcbbc1b3 -r 2eb6d38eccb7 sys/netinet6/in6_ifattach.c
--- a/sys/netinet6/in6_ifattach.c       Fri Oct 18 02:19:12 2013 +0000
+++ b/sys/netinet6/in6_ifattach.c       Fri Oct 18 02:20:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6_ifattach.c,v 1.87 2011/12/31 20:41:59 christos Exp $       */
+/*     $NetBSD: in6_ifattach.c,v 1.88 2013/10/18 02:20:15 mrg Exp $    */
 /*     $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $  */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.87 2011/12/31 20:41:59 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.88 2013/10/18 02:20:15 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -588,12 +588,7 @@
        }
 
        ia = in6ifa_ifpforlinklocal(ifp, 0); /* ia must not be NULL */
-#ifdef DIAGNOSTIC
-       if (!ia) {
-               panic("ia == NULL in in6_ifattach_linklocal");
-               /* NOTREACHED */
-       }
-#endif
+       KASSERTMSG(ia, "ia == NULL in in6_ifattach_linklocal");
 
        /*
         * Make the link-local prefix (fe80::/64%link) as on-link.



Home | Main Index | Thread Index | Old Index