Author: bz
Date: Thu Jan  5 01:13:25 2012
New Revision: 229546
URL: http://svn.freebsd.org/changeset/base/229546

Log:
  Convert an #ifdef DIAGNOSTIC if/panic to a KASSERT.
  
  MFC after:    1 week

Modified:
  head/sys/netinet6/in6_ifattach.c

Modified: head/sys/netinet6/in6_ifattach.c
==============================================================================
--- head/sys/netinet6/in6_ifattach.c    Thu Jan  5 00:11:04 2012        
(r229545)
+++ head/sys/netinet6/in6_ifattach.c    Thu Jan  5 01:13:25 2012        
(r229546)
@@ -513,12 +513,8 @@ in6_ifattach_linklocal(struct ifnet *ifp
        }
 
        ia = in6ifa_ifpforlinklocal(ifp, 0); /* ia must not be NULL */
-#ifdef DIAGNOSTIC
-       if (!ia) {
-               panic("ia == NULL in in6_ifattach_linklocal");
-               /* NOTREACHED */
-       }
-#endif
+       KASSERT(ia != NULL, ("%s: ia == NULL, ifp=%p", __func__, ifp));
+
        ifa_free(&ia->ia_ifa);
 
        /*
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to