summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2010-08-06 11:49:52 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2010-08-06 11:49:52 +0000
commit0429cca0cc875ebdc9161744a0a710628cc44b57 (patch)
treec87893191c1d08fde79dcb7f97d0ad99ef71674f /sys
parent5c35201ff3127492bf3c316bd813bd2691b38394 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/if_ether.c8
-rw-r--r--sys/netinet6/nd6.c9
2 files changed, 5 insertions, 12 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 632335328488..5b7ad757cf65 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -163,12 +163,10 @@ static void
arptimer(void *arg)
{
struct ifnet *ifp;
- struct llentry *lle = (struct llentry *)arg;
+ struct llentry *lle;
- if (lle == NULL) {
- panic("%s: NULL entry!\n", __func__);
- return;
- }
+ KASSERT(arg != NULL, ("%s: arg NULL", __func__));
+ lle = (struct llentry *)arg;
ifp = lle->lle_tbl->llt_ifp;
CURVNET_SET(ifp->if_vnet);
IF_AFDATA_LOCK(ifp);
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 30efbf0160f6..b914bd128979 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -441,14 +441,9 @@ nd6_llinfo_timer(void *arg)
struct ifnet *ifp;
struct nd_ifinfo *ndi = NULL;
+ KASSERT(arg != NULL, ("%s: arg NULL", __func__));
ln = (struct llentry *)arg;
- if (ln == NULL) {
- panic("%s: NULL entry!\n", __func__);
- return;
- }
-
- if ((ifp = ((ln->lle_tbl != NULL) ? ln->lle_tbl->llt_ifp : NULL)) == NULL)
- panic("ln ifp == NULL");
+ ifp = ln->lle_tbl->llt_ifp;
CURVNET_SET(ifp->if_vnet);