git: 5de5b5a34db9 - main - route_ctl: eliminate write only variables ifa and nh
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 05 Apr 2022 04:33:00 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=5de5b5a34db93a2a646e88d39a8e7718f925636f
commit 5de5b5a34db93a2a646e88d39a8e7718f925636f
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-04-05 02:37:59 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-04-05 04:30:48 +0000
route_ctl: eliminate write only variables ifa and nh
Sponsored by: Netflix
---
sys/net/route/route_ctl.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c
index 123939fd31c9..5a4ff943ac2f 100644
--- a/sys/net/route/route_ctl.c
+++ b/sys/net/route/route_ctl.c
@@ -630,7 +630,6 @@ create_rtentry(struct rib_head *rnh, struct rt_addrinfo *info,
struct sockaddr *dst, *ndst, *gateway, *netmask;
struct rtentry *rt;
struct nhop_object *nh;
- struct ifaddr *ifa;
int error, flags;
dst = info->rti_info[RTAX_DST];
@@ -686,7 +685,6 @@ create_rtentry(struct rib_head *rnh, struct rt_addrinfo *info,
* This moved from below so that rnh->rnh_addaddr() can
* examine the ifa and ifa->ifa_ifp if it so desires.
*/
- ifa = info->rti_ifa;
rt->rt_weight = get_info_weight(info, RT_DEFAULT_WEIGHT);
rt_set_expire_info(rt, info);
@@ -1061,10 +1059,9 @@ change_route(struct rib_head *rnh, struct rt_addrinfo *info,
struct route_nhop_data *rnd_orig, struct rib_cmd_info *rc)
{
int error = 0;
- struct nhop_object *nh, *nh_orig;
+ struct nhop_object *nh_orig;
struct route_nhop_data rnd_new;
- nh = NULL;
nh_orig = rnd_orig->rnd_nhop;
if (nh_orig == NULL)
return (ESRCH);