diff options
author | luigi <luigi@FreeBSD.org> | 2004-04-12 20:24:30 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2004-04-12 20:24:30 +0000 |
commit | 1a6dae835ce85b6f850982743b63c0c36ebe975a (patch) | |
tree | 2c90f27d8d90aea474a70dd2ab8a9cc09513644c /sys/net | |
parent | 92223ccc320972e0072034695fa655271a5d1d3c (diff) | |
download | FreeBSD-src-1a6dae835ce85b6f850982743b63c0c36ebe975a.zip FreeBSD-src-1a6dae835ce85b6f850982743b63c0c36ebe975a.tar.gz |
in rtinit(), remove one useless variable, and move a few others
within the block where they are used.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/route.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index c3b2863..5a083ca 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1148,16 +1148,12 @@ rt_maskedcopy(struct sockaddr *src, struct sockaddr *dst, struct sockaddr *netma int rtinit(struct ifaddr *ifa, int cmd, int flags) { - register struct rtentry *rt; - register struct sockaddr *dst; - register struct sockaddr *deldst; + struct sockaddr *dst; struct sockaddr *netmask; struct mbuf *m = 0; - struct rtentry *nrt = 0; - struct radix_node_head *rnh; - struct radix_node *rn; - int error; + struct rtentry *rt = 0; struct rt_addrinfo info; + int error; if (flags & RTF_HOST) { dst = ifa->ifa_dstaddr; @@ -1172,6 +1168,10 @@ rtinit(struct ifaddr *ifa, int cmd, int flags) * be confusing at best and possibly worse. */ if (cmd == RTM_DELETE) { + struct sockaddr *deldst; + struct radix_node_head *rnh; + struct radix_node *rn; + /* * It's a delete, so it should already exist.. * If it's a net, mask off the host bits @@ -1213,8 +1213,8 @@ bad: info.rti_info[RTAX_DST] = dst; info.rti_info[RTAX_GATEWAY] = ifa->ifa_addr; info.rti_info[RTAX_NETMASK] = netmask; - error = rtrequest1(cmd, &info, &nrt); - if (error == 0 && (rt = nrt) != NULL) { + error = rtrequest1(cmd, &info, &rt); + if (error == 0 && rt != NULL) { /* * notify any listening routing agents of the change */ |