summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-07-30 23:30:09 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-07-30 23:30:09 +0000
commit5e6b88c9215f0ae541960833bfd80d49bcaa5b42 (patch)
treeb20841a87f6ef08fdbea2e60125ebf7c68903b75 /sys/netinet6
parentf1749fbc565e4c1c3534d530dcb0561f5469b2ad (diff)
remove unneeded NULL pointer checks.
From: tedu <grendel@zeitbombe.org>
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/icmp6.c4
-rw-r--r--sys/netinet6/nd6_rtr.c12
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 56ceef1106b..0da36e0ccf1 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.62 2002/07/10 05:08:03 itojun Exp $ */
+/* $OpenBSD: icmp6.c,v 1.63 2002/07/30 23:30:08 itojun Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -2269,7 +2269,7 @@ icmp6_redirect_input(m, off)
struct in6_addr reddst6;
union nd_opts ndopts;
- if (!m || !ifp)
+ if (!ifp)
return;
/* XXX if we are router, we don't update route by icmp6 redirect */
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index a8d3734b946..7842663689f 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_rtr.c,v 1.21 2002/06/09 14:38:39 itojun Exp $ */
+/* $OpenBSD: nd6_rtr.c,v 1.22 2002/07/30 23:30:08 itojun Exp $ */
/* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */
/*
@@ -648,6 +648,11 @@ defrouter_delreq(dr)
struct sockaddr_in6 def, mask, gw;
struct rtentry *oldrt = NULL;
+#ifdef DIAGNOSTIC
+ if (!dr)
+ panic("dr == NULL in defrouter_delreq");
+#endif
+
Bzero(&def, sizeof(def));
Bzero(&mask, sizeof(mask));
Bzero(&gw, sizeof(gw)); /* for safety */
@@ -661,7 +666,7 @@ defrouter_delreq(dr)
#endif
rtrequest(RTM_DELETE, (struct sockaddr *)&def,
- dr ? (struct sockaddr *)&gw : NULL,
+ (struct sockaddr *)&gw,
(struct sockaddr *)&mask, RTF_GATEWAY, &oldrt);
if (oldrt) {
nd6_rtmsg(RTM_DELETE, oldrt);
@@ -675,8 +680,7 @@ defrouter_delreq(dr)
}
}
- if (dr)
- dr->installed = 0;
+ dr->installed = 0;
}
/*