diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2011-12-06 12:58:35 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2011-12-06 12:58:35 +0000 |
commit | a49b0ba3214da6b72b586c564f3fcdf1283b2832 (patch) | |
tree | 84b38c83109d2e04d737ae999b1c46c785f39c20 /sys/net | |
parent | 7b27b1c024fe97955cf263f27c24e3322ba05709 (diff) |
Remove needless temporary variable for greater clarity.
testing sthen@
ok sthen@ henning@ dlg@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/route.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index 082547d395d..14f7a1f13c3 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.134 2011/12/06 12:53:26 blambert Exp $ */ +/* $OpenBSD: route.c,v 1.135 2011/12/06 12:58:34 blambert Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -991,12 +991,11 @@ bad: } int -rt_setgate(struct rtentry *rt0, struct sockaddr *dst, struct sockaddr *gate, +rt_setgate(struct rtentry *rt, struct sockaddr *dst, struct sockaddr *gate, u_int tableid) { caddr_t new, old; int dlen = ROUNDUP(dst->sa_len), glen = ROUNDUP(gate->sa_len); - struct rtentry *rt = rt0; if (rt->rt_gateway == NULL || glen > ROUNDUP(rt->rt_gateway->sa_len)) { old = (caddr_t)rt_key(rt); @@ -1014,9 +1013,7 @@ rt_setgate(struct rtentry *rt0, struct sockaddr *dst, struct sockaddr *gate, Free(old); } if (rt->rt_gwroute != NULL) { - rt = rt->rt_gwroute; - RTFREE(rt); - rt = rt0; + RTFREE(rt->rt_gwroute); rt->rt_gwroute = NULL; } if (rt->rt_flags & RTF_GATEWAY) { |