Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jan 2012 01:13:25 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r229546 - head/sys/netinet6
Message-ID:  <201201050113.q051DPbn007563@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201050113.q051DPbn007563>