Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Use KASSERT to check programming errors
details: https://anonhg.NetBSD.org/src/rev/dab9575bc40c
branches: trunk
changeset: 340374:dab9575bc40c
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Wed Sep 02 08:03:10 2015 +0000
description:
Use KASSERT to check programming errors
diffstat:
sys/netinet6/nd6.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (34 lines):
diff -r c11f34282ef9 -r dab9575bc40c sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Wed Sep 02 05:09:25 2015 +0000
+++ b/sys/netinet6/nd6.c Wed Sep 02 08:03:10 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.172 2015/09/01 08:52:02 ozaki-r Exp $ */
+/* $NetBSD: nd6.c,v 1.173 2015/09/02 08:03:10 ozaki-r Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.172 2015/09/01 08:52:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.173 2015/09/02 08:03:10 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -451,10 +451,11 @@
return;
}
- if ((rt = ln->ln_rt) == NULL)
- panic("ln->ln_rt == NULL");
- if ((ifp = rt->rt_ifp) == NULL)
- panic("ln->ln_rt->rt_ifp == NULL");
+ rt = ln->ln_rt;
+ KASSERT(rt != NULL);
+ ifp = rt->rt_ifp;
+ KASSERT(ifp != NULL);
+
ndi = ND_IFINFO(ifp);
dst = satocsin6(rt_getkey(rt));
Home |
Main Index |
Thread Index |
Old Index