summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-08-17 09:50:13 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-08-17 09:50:13 +0000
commite5856b32aab88d74036bed1037eb57a65a2c2814 (patch)
treeda4645b7a5179ef1b9bb520496817313732526a9 /sys/net
parentde4fde5386bf63560a5c22cd6f69dbf741b6dd10 (diff)
Remove unused variable in rt_ifa_add(), prodded by bluhm@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/route.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index f8fa97ca62b..2888fba9cfb 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.219 2015/08/17 09:46:26 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.220 2015/08/17 09:50:12 mpi Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -1148,7 +1148,7 @@ int
rt_ifa_add(struct ifaddr *ifa, int flags, struct sockaddr *dst)
{
struct ifnet *ifp = ifa->ifa_ifp;
- struct rtentry *rt, *nrt = NULL;
+ struct rtentry *rt = NULL;
struct sockaddr_rtlabel sa_rl;
struct rt_addrinfo info;
u_short rtableid = ifp->if_rdomain;
@@ -1180,8 +1180,8 @@ rt_ifa_add(struct ifaddr *ifa, int flags, struct sockaddr *dst)
if (flags & (RTF_LOCAL|RTF_BROADCAST))
prio = RTP_LOCAL;
- error = rtrequest1(RTM_ADD, &info, prio, &nrt, rtableid);
- if (error == 0 && (rt = nrt) != NULL) {
+ error = rtrequest1(RTM_ADD, &info, prio, &rt, rtableid);
+ if (error == 0 && rt != NULL) {
if (rt->rt_ifa != ifa) {
printf("%s: wrong ifa (%p) was (%p)\n", __func__,
ifa, rt->rt_ifa);